home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c
- Path: sparky!uunet!nntp1.radiomail.net!fernwood!pure!rpeck
- From: rpeck@pure.com (Ray Peck)
- Subject: Re: Typedefing builtin... thanks.
- Message-ID: <1992Nov17.235519.24646@pure.com>
- Organization: Pure Software, Los Altos, CA
- References: <1992Nov9.150414.10221@odin.diku.dk>
- Date: Tue, 17 Nov 1992 23:55:19 GMT
- Lines: 22
-
-
- In article <1992Nov9.150414.10221@odin.diku.dk> . . .:
-
- >People generally tended to agree with me on the use of the names BYTE, WORD,
- >and LWORD to represent unsigned 8, 16, and 32 bit variables in my simulation
-
- >The major arguments used to justify these techniques were about portability.
- >A program is easier to port, when you can change some typedefs in a header
- >file, instead of changing a lot of ints to longs all over the code.
-
- The only problem with this is a WORD is not a portable concept (i.e.,
- people in 68k's call 16 bits a word, while people on Real Machines ;-)
- call 32 bits a word. All modern machines use 32b and up.
-
-
- For this reason, I prefer types int8, int16, int32, or (better) u1b,
- u2b, u4b, (unsigned) and s1b, s2b, s4b (signed).
-
- --
- Ray Peck rpeck@pure.com
- Pure Software 415-903-5100
-
-