Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!lll-crg!mordor!sri-spam!rutgers!clyde!watmath!rbutterworth From: rbutterworth@watmath.UUCP (Ray Butterworth) Newsgroups: comp.lang.c Subject: Re: sizeof(char) Message-ID: <3299@watmath.UUCP> Date: Mon, 10-Nov-86 15:50:49 EST Article-I.D.: watmath.3299 Posted: Mon Nov 10 15:50:49 1986 Date-Received: Mon, 10-Nov-86 23:52:27 EST References: <4617@brl-smoke.ARPA> <657@dg_rtp.UUCP> Organization: U of Waterloo, Ontario Lines: 10 > In article <126@olamb.UUCP> kimcm@olamb.UUCP (Kim Chr. Madsen) writes: > >Why not take the full step and let the datatype char be of variable size, > >like int's and other types. Then invent the datatype ``byte'' which is exactly > >8 bits long. Who says bytes are 8 bits long? They're 9 on the machine I use. Why not make sizeof() return the number of bits? I don't think there is much argument about how big a bit is. And the number of bits is much more useful than the number of chars. If you really want the number of chars, use "sizeof(object)/sizeof(char)".