LONG_MAX in D
Luís Marques
luismarques+spam at gmail.com
Thu Aug 17 17:30:41 PDT 2006
nobody wrote:
> Another way to define LONG_MAX conditionally is explained in the Static
> If Condition of the above page:
>
> static if(size_t.sizeof == 4)
> const int LONG_MAX = int.max;
>
> static if(size_t.sizeof == 8)
> const long LONG_MAX = long.max;
Well, I don't see much point in that, over "size_t.max / 2" :-)
(ah yes, now I notice that I forgot the ".max")
Luís
More information about the Digitalmars-d
mailing list