www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Hello World

reply Pedro Mendes <pedromendescraft gmail.com> writes:
void main()
{
     import std.stdio : writefln;
     writefln("Hello World");
}
Feb 17
next sibling parent reply Berni44 <someone somemail.com> writes:
void main()
{
     import std.stdio : writefln;
     writefln!"Hello Pedro"();
}
Feb 17
parent u <uselesscontribution uselesscontribution.uselesscontribution> writes:
On Wednesday, 17 February 2021 at 18:53:55 UTC, Berni44 wrote:
 void main()
 {
     import std.stdio : writefln;
     writefln!"Hello Pedro"();
 }
// dmd -c <file> pragma(msg, "Hello Pedro");
Feb 17
prev sibling next sibling parent Imperatorn <johan_forsberg_86 hotmail.com> writes:
On Wednesday, 17 February 2021 at 16:37:30 UTC, Pedro Mendes 
wrote:
 void main()
 {
     import std.stdio : writefln;
     writefln("Hello World");
 }
import core.stdc.stdio; void main() {    printf("Hello World, what's happening"); }
Feb 17
prev sibling next sibling parent Rumbu <rumbu rumbu.ro> writes:
Well, since I had a deep dive in the Windows world...

extern(Windows) void GetStdHandle(int);
extern(Windows) void WriteFile(size_t, size_t, int, size_t, 
size_t);
extern(Windows) void ExitProcess(int);

int main()
{
    asm
    {
         naked;
         push -11;
         call GetStdHandle;
         mov EBX, EAX;
         push 0;
         lea EAX, [ESP - 4];
         push EAX;
         push 11;
         push msg;
         push EBX;
         call WriteFile;
         push 0;
         call ExitProcess;
    msg:
         db "Hello Pedro\n";
    }
}
Feb 17
prev sibling parent reply claptrap <clap trap.com> writes:
import std;

void main()
{
     throw new Exception("Goodbye cruel world!");
}
Feb 18
parent claptrap <clap trap.com> writes:
On Thursday, 18 February 2021 at 10:24:37 UTC, claptrap wrote:
 import std;

 void main()
 {
     throw new Exception("Goodbye cruel world!");
 }
Oops was meant to be void main() { throw new Exception("Goodbye cruel world!"); }
Feb 18