home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.arch
- Path: sparky!uunet!orca!javelin.sim.es.com!moons!jsnow
- From: jsnow@moons.sim.es.com (John Snow)
- Subject: Re: 32 => 64 Transition
- Message-ID: <jsnow.713740135@moons>
- Sender: news@javelin.sim.es.com
- Nntp-Posting-Host: moonsgw.sim.es.com
- Organization: Evans & Sutherland Computer Corporation
- References: <1992Aug08.165832.114442@cs.cmu.edu> <1992Aug11.125326.16719@email.tuwien.ac.at> <id.UHAS.9TA@ferranti.com> <1992Aug13.182851.18305@mprgate.mpr.ca>
- Date: Thu, 13 Aug 1992 21:08:55 GMT
- Lines: 50
-
- mcvey@mpr.ca (Iain McVey) writes:
-
- >Hmm, perhaps I have my wires crossed here, but I thought that int was
- >supposed to be processor defined, and that tiny, short and long were
- >of standard size. ie.
-
- > 16 bit 32 bit 64 bit
- >tiny 8 8 8
- >short 16 16 16
- >long 32 32 32
- >long long (64) (64) 64
-
- >int 16 32 64
-
- >with pointers implementation dependent.
-
- >no?
-
- >- Iain -
- >--
- >Iain McVey (mcvey@mpr.ca) | Kodachrome, gives us those nice, bright colours,
- >Software Designer | Gives the greens of summers,
- >MPR Teltech Ltd. | Makes you think all the world's a sunny day.
- >8999 Nelson Way, Burnaby, BC | - Paul Simon
-
-
- According to Harbison & Steele's "C: A Reference Manual":
-
- "The type int may not be shorter than short and long may not be
- shorter int." ---------------
- -----------
-
- "A good rule of thumb is that long is the largest supported integer
- size, while int is the largest efficient integer size. If efficiency
- is much more important that portability, then the int type may be the
- better one to use."
-
- They go on to say that if portability is a goal, then it is best to
- define your own data types like INT64, INT32, INT16, INT8. These type
- definitions could reside in hardware specific .h files. Only this .h
- file needs to change for each hardware implementation and the rest of
- the source code stays the same.
-
- --John
-
- --
- -----------------------------------------------------------------------------
- John F. Snow INET: jsnow@moons.sim.es.com
- Evans & Sutherland Computer Corp.
- Salt Lake City, Utah America Online: JohnSnow GEnie: J.SNOW2
-