LONG_MAX in D

Anders F Björklund afb at algonet.se
Fri Aug 18 00:23:04 PDT 2006


nobody wrote:

> Assuming you want to define an equivalent using D then it would be done 
> as follows:
> 
>   version(X86)
>     const int LONG_MAX = int.max;
> 
>   version(X86_64)
>     const long LONG_MAX = long.max;

Effectively limiting yourself to the Intel archs, of course...
See http://www.prowiki.org/wiki4d/wiki.cgi?DocComments/Version

size_t sounds more useful.

--anders



More information about the Digitalmars-d mailing list