Clarifying the C "int" Datatypes
Mike Tracy
miket at ccicpg.UUCP
Fri Jan 29 03:44:27 AEST 1988
In article <6240 at sol.ARPA> crowl at cs.rochester.edu (Lawrence Crowl) writes:
>Since I've noticed some confusion on the C "int" datatypes, I thought I would
>post a clarification. The "int" datatypes are not integers, they are machine
>"words".
(Please excuse typos - some keys on this #1$&?@ keyboard don't always work)
I'll have to disagree with you. Many machines use a 16 bit word while an
'int' is (many times) 32 bits. It has more to do with the natural size
of objects that the system manipulates. example: if your machine
"likes" to add together 32 bit numbers than, most likely, an int is 32 bits.
An 'int' reflects more of what is 'optimum' for the machine's cpu, bus, etc.
to handle, not word size.
I do agree that mixing bytes and ints, etc. can be lead to problems with
non-portable code.
--
Michael D. Tracy Computer Consoles Incorporated
(714)458-7282 9801 Muirlands Boulevard
Irvine, CA 92718
{allegra!hplabs!felix,seismo!rlgvax}!ccicpg!miket
More information about the Comp.lang.c
mailing list