Path: utzoo!news-server.csri.toronto.edu!rutgers!usc!samsung!munnari.oz.au!metro!cluster!necisa!boyd From: boyd@necisa.ho.necisa.oz.au (Boyd Roberts) Newsgroups: comp.lang.c Subject: Re: bug? in turbo c++ Message-ID: <2040@necisa.ho.necisa.oz.au> Date: 11 Mar 91 04:24:28 GMT References: <1991Mar6.171424.17409@nntp-server.caltech.edu> <1991Mar6.173733.430@unhd.unh.edu> Organization: NEC Information Systems Australia Pty. Ltd. Lines: 21 In article kirste@methan.chemie.fu-berlin.de (Burkhard Kirste) writes: >Under UNIX, it doesn't matter: int = long = 32 bit (usually), >although you have to specify %hd for short int (16 bit). I can see you have vast experience on many UNIX machines. Repeat after me: long and int are not the same >Otherwise, if int = 16 bit, long = 32 bit, you have to use >%ld for long. That is simply logical, not a "bug"! No, %d for int, %ld for long. It doesn't matter how many bits are involved, the whole issue is to do with the _type_ of the arguments. Use the right format specifiers for the right types -- forget bits. Boyd Roberts boyd@necisa.ho.necisa.oz.au ``When the going gets wierd, the weird turn pro...''