Mail Archives: djgpp/1996/05/01/19:05:37
From: j DOT aldrich6 AT genie DOT com
Date: Mon, 29 Apr 96 00:20:00 UTC 0000
Reply to message 3437345 from STWAND07 AT UCTV on 04/28/96 3:58PM
>The use of long has no effect in DJGPP since int's are "long" (32 bit)
>by default.
Actually, printf() and similar commands will moan and groan if you send
them longs with %d specifiers, or ints with %ld. I guess this is for
compatibility, as no compiler I've seen has required the use of %h
for shorts.
Actually they all would complain except that with a variable argument list
function like printf, etc, shorts are upgraded to ints before calling the
function so it does not matter!
Speaking of longs vs. ints, I had a great deal of fun with v1.2, which defined
size_t as an int rather than a long, which is standard. Then, when v2 came
out and turned size_t back to a long, I had to go and change all those
print specifiers back. Or was it size_t? I can't even remember now, but it
was one of the defined _t types. :)
--
Art S. Kagel, kagel AT quasar DOT bloomberg DOT com
A proverb is no proverb to you 'till life has illustrated it. -- John Keats
- Raw text -