LONG_MAX in D

Don Clugston dac at nospam.com.au
Fri Aug 18 05:52:04 PDT 2006


Luís Marques wrote:
> nobody wrote:
>>   long val;
>>   long.max // works
>>   val.max  // also works
> 
> LONG_MAX is "Maximal value which can be stored in a long int variable" 
> (in C) and differs with platforms (e.g. 32 bit, 64 bit).

Why would you want this in a D program?
You can probably find what you want in std.stdint.

> long.max is fixed for a 64-bit integer.
> 
>> Also wanted to suggest that D.learn might be a more responsive place 
>> to ask this sort of question. This NG seems to be more meta-D than 
>> anything-D (while both happen). You will want to come back here to see 
>> the next mega wave of discussion about getting import to work, whether 
>> consts are good or evil, how auto should work and pretty much anything 
>> related to the way classes are implemented.
> 
> Perhaps you are right, but I felt that this isn't a question about 
> learning the language itself and that D.learn might not be the best 
> resource. What are the boundaries?

Many things like this have been posted there in the past. It's not so 
much a newbies forum as a "how can I do xxx" forum.



More information about the Digitalmars-d mailing list