Mail Archives: djgpp/1998/10/02/19:55:22
Uhfgood wrote:
> I can type in up to 10 digits without displaying some
> other number... it's as if i had used a long and stead of an int, but
> it is for
> sure an int... Can someone explain why i'm able to type up to 10
> digits with
> no problems.... I thought an integer could only hold up 32767...
The ANSI C standard makes few restrictions on the _actual_ sizes of
variables. An int is guaranteed to be no smaller than a short, which by
the standard is guaranteed to be at least 16 bits (but may be more).
The int is intended to be whatever integer size is "natural" for the
native compiler. For DJGPP (based on gcc), that's 32 bits.
--
Erik Max Francis / email max AT alcyone DOT com / whois mf303 / icq 16063900
Alcyone Systems / irc maxxon (efnet) / finger max AT sade DOT alcyone DOT com
San Jose, CA / languages En, Eo / web http://www.alcyone.com/max/
USA / icbm 37 20 07 N 121 53 38 W / &tSftDotIotE
\
/ Covenants without the sword are but words.
/ Camden
- Raw text -