bug? in turbo c++
Henry Spencer
henry at zoo.toronto.edu
Thu Mar 7 07:44:49 AEST 1991
In article <1991Mar6.173733.430 at unhd.unh.edu> rg at msel.unh.edu (Roger Gonzalez) writes:
>The third number printed is always zero. It corrects itself if the
>second formatting string is %10ld. Is this a new ansi-ism? Will this
>behavior change to what my Unix cc fingers expect if I set it to K&R?
>Is it a bug? ...
It is not a bug; it is correct behavior. Printing a long with %d has
always been wrong, and if it worked it was because you were lucky in
your choice of machine and compiler such that it accidentally came
out right.
--
"But this *is* the simplified version | Henry Spencer @ U of Toronto Zoology
for the general public." -S. Harris | henry at zoo.toronto.edu utzoo!henry
More information about the Comp.lang.c
mailing list