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=0.7 required=5.0 tests=BAYES_20,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: 1014db,4873305131bf4d94 X-Google-Attributes: gid1014db,public X-Google-Thread: fdb77,4873305131bf4d94 X-Google-Attributes: gidfdb77,public X-Google-Thread: 103376,4873305131bf4d94 X-Google-Attributes: gid103376,public From: Marcelo Meira 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: <345F5F35.41C6@waii.com>#1/1 X-Deja-AN: 287006756 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> <345f4f9e.0@isc-newsserver.isc.rit.edu> Organization: Western Geophysical, Div. of Western Atlas Int'l, Houston, TX 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: Daniel Anderson wrote: > > 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. Illustrating, in an IRIX64 system: short = 2 bytes int = 4 bytes long = 8 bytes E agora, Jose'? -- ---------------- Marcelo L. Meira Programmer Western Geophysical - (713) 963-2679