Why does the following program write the message 'Foo' twice?

Dicebot public at dicebot.lv
Wed Mar 19 03:11:10 PDT 2014


On Wednesday, 19 March 2014 at 10:08:50 UTC, Gary Willoughby
wrote:
> Why does the following program write the message 'Foo' twice?
>
> void main(string[] args)
> {
> 	pragma(msg, "Foo");
> }

Once upon compilation and once upon run-time. I don't know if it
is intended design but this is how `pragma(msg)` works if put
into function body.


More information about the Digitalmars-d-learn mailing list