digitalmars.D - Hello World
- Pedro Mendes (5/5) Feb 17 2021 void main()
void main() { import std.stdio : writefln; writefln("Hello World"); }
Feb 17 2021
void main() { import std.stdio : writefln; writefln!"Hello Pedro"(); }
Feb 17 2021
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 2021
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 2021
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 2021
import std; void main() { throw new Exception("Goodbye cruel world!"); }
Feb 18 2021
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 2021