From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=BAYES_00,INVALID_MSGID, PLING_QUERY autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 109fba,4873305131bf4d94 X-Google-Attributes: gid109fba,public X-Google-Thread: 103376,4873305131bf4d94 X-Google-Attributes: gid103376,public X-Google-Thread: fdb77,4873305131bf4d94 X-Google-Attributes: gidfdb77,public X-Google-Thread: 1014db,4873305131bf4d94 X-Google-Attributes: gid1014db,public From: dwa1844@rit.edu (Daniel Anderson) Subject: Re: How big is an int? (was: Yet another stupid language war (was: ... the only languages you need!!)) Date: 1997/11/04 Message-ID: <345f4f9e.0@isc-newsserver.isc.rit.edu>#1/1 X-Deja-AN: 287903644 References: <34557f2b.1934172@news.mindspring.com> <3456e71b.3833189@news.mindspring.com> <3458D116.2D34@pseserv3.fw.hac.com> <63anc7$75p$1@darla.visi.com> <345947D2.D20EF8E9@horvath.com> <345F49A2.5F5DC5A0@aom.ericsson.se> Organization: Rochester Institute of Technology Newsgroups: comp.lang.ada,comp.lang.c,comp.lang.c++,comp.lang.java.advocacy,comp.lang.c,comp.lang.c++ Date: 1997-11-04T00:00:00+00:00 List-Id: In article <345F49A2.5F5DC5A0@aom.ericsson.se>, qhslyng@aom.ericsson.se says... > >Bob Horvath wrote: >> >> Hmmmm. How big is an int? > >As I've understood it, an int has two legal sizes. A short has only one, >and the same goes for a long. I believe that there were a lot of >different compilers on the market before C was standardised. Some used 2 >byte int and some used 4 byte ints. > >short = 2 bytes >int = 2 or 4 bytes >long = 4 bytes > >If this is true, I see no reason for ever using ints in new C programs. Actually, the size of the variables (the byte sizes) depend on the operating system.