Mail Archives: djgpp/1997/07/30/04:47:09
mert0407 AT sable DOT ox DOT ac DOT uk (George Foot) wrote:
>Mark Levis (mlevis AT voyager DOT net) wrote:
>
>: Use a double. It will have precision up to 14 digits. An int will only
>: handle number from
>: -32767 to 32768.
>: unsigned int 0 65535
>
>That's compiler dependent;
Actually, that is compiler independent. You should always try to
keep within the portable range of values of any type.
>since this was cross-posted to
>comp.os.msdos.djgpp I assume the compiler in question is the gcc with
>djgpp, which uses 32-bit ints by default, not 16-bit. The range is about
>four (American) billion I believe.
It is still best to use a long [-2,147,483,647..2,147,483,647] or
unsigned long [0..4,294,967,295] and keep within the portable
range of values. If that doesn't do it, use a double rather than
some unportable larger integer type.
--
Craig
clfranck AT worldnet DOT att DOT net
Manchester, NH
Most rock journalism is people who can't write interviewing
people who can't talk for people who can't read. -- Frank Zappa
- Raw text -