Mail Archives: djgpp/1998/09/23/16:01:59
Chris Brooker wrote:
> I heard somewhere that if you keep you data in longs it actually runs
> faster, so if you are worried about speed and new memory usage then
> you must keep your data in longs.
You probably mean ints, not longs. In C, int is intended to be the
"natural" word size. A long is guaranteed to be no smaller than an int,
and at least 32 bits, but other than that there are no other
restrictions.
> Is this true of:
> a) A 16 bit program? (Pacific C)
> b) A 32 bit program? (DJGPP (gcc))
int will be the "natural" word size on any platform or with any
compiler. long may or may not be the same size as int, depending on the
compiler. In typical 16-bit DOS compilers, an int is 16 bits, and a
long is 32 bits (though this is not mandated by the standard). In
DJGPP, but int and long are 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
\
/ Dead men have no victory.
/ Euripides
- Raw text -