Version bug?

Adam Ruppe destructionator at gmail.com
Fri Aug 20 18:08:14 PDT 2010


On 8/20/10, Andrej Mitrovic <andrej.mitrovich at gmail.com> wrote:
> There are no global variables in D, afaik. But I haven't studied this
> closely yet.

The opposite: there are multiple  kinds. You have enums in the global
scope, which are available to everyone, but don't take any storage
(that's what I used here), you have regular globals, which are
available to everyone, but in thread local storage, and you have real
global variables which are available to everyone and you are on your
own, like in C.

enum int compileTimeGlobal;
int threadLocalGlobal;
__gshared int realGlobalLikeInC;


More information about the Digitalmars-d mailing list