Newsgroups: comp.lang.c Path: utzoo!henry From: henry@zoo.toronto.edu (Henry Spencer) Subject: Re: bug? in turbo c++ Message-ID: <1991Mar6.214449.17775@zoo.toronto.edu> Date: Wed, 6 Mar 1991 21:44:49 GMT References: <1991Mar6.171424.17409@nntp-server.caltech.edu> <1991Mar6.173733.430@unhd.unh.edu> Organization: U of Toronto Zoology In article <1991Mar6.173733.430@unhd.unh.edu> rg@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@zoo.toronto.edu utzoo!henry