Global variables read at compile time?

Andrej Mitrovic andrej.mitrovich at gmail.com
Wed Aug 15 07:48:25 PDT 2012


On 8/15/12, d_follower <d_follower at fakemail.com> wrote:
> I don't really know why, but it seems that you can only
> initialize globals with constants.

That's what the static constructor is for:
http://dlang.org/class.html#StaticConstructor
http://dlang.org/class.html#SharedStaticConstructor


More information about the Digitalmars-d-learn mailing list