Thread overview | |||||||||
---|---|---|---|---|---|---|---|---|---|
|
February 17, 2021 Hello World | ||||
---|---|---|---|---|
| ||||
void main() { import std.stdio : writefln; writefln("Hello World"); } |
February 17, 2021 Re: Hello World | ||||
---|---|---|---|---|
| ||||
Posted in reply to Pedro Mendes | void main() { import std.stdio : writefln; writefln!"Hello Pedro"(); } |
February 17, 2021 Re: Hello World | ||||
---|---|---|---|---|
| ||||
Posted in reply to Berni44 | 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");
|
February 18, 2021 Re: Hello World | ||||
---|---|---|---|---|
| ||||
Posted in reply to Pedro Mendes | 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");
}
|
February 18, 2021 Re: Hello World | ||||
---|---|---|---|---|
| ||||
Posted in reply to Pedro Mendes | 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"; } } |
February 18, 2021 Re: Hello World | ||||
---|---|---|---|---|
| ||||
Posted in reply to Pedro Mendes | import std; void main() { throw new Exception("Goodbye cruel world!"); } |
February 18, 2021 Re: Hello World | ||||
---|---|---|---|---|
| ||||
Posted in reply to claptrap | 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!");
}
|
Copyright © 1999-2021 by the D Language Foundation