From mboxrd@z Thu Jan 1 00:00:00 1970 From: Earnie Boyd To: gw32 , sjm Subject: Re: long long vs long Date: Fri, 24 Jul 1998 12:58:00 -0000 Message-id: <19980724131448.5767.rocketmail@send101.yahoomail.com> X-SW-Source: 1998-07/msg00544.html ---sjm wrote: > > > Earnie Boyd writes: > > Or why not set a new standard something like > > > > int8, int16, int32, int64 to indicate the number of bits. > > Right! The ambiguity of variable sizes has been the most unportable feature of > C. I know why they did it but it is still a pain. In those days the world > hadn't decided whether word sizes would be a multiple of 6 or 8 bits. > Implementing a 32 bit data type on an 18 bit (or 24 bit) machine would have > been a disaster. Some machines would have wanted int6, int12, int18 and int24 > as bacic integer sizes. It was better to leave word sizes ambiguous and accept > the portability problem. > If the compiler were to recognize the number following the `int' as the number of bits to be used then one could specify whatever they wished. This would lend itself to `no problem' when porting assuming the compiler could recognize this format. BTW, IMHO, short should be the sizeof(int)/2 and long should be sizeof(int)*2. == - \\||// ---o0O0--Earnie--0O0o---- --earnie_boyd@yahoo.com-- ------ooo0O--O0ooo------- _________________________________________________________ DO YOU YAHOO!? Get your free @yahoo.com address at http://mail.yahoo.com - For help on using this list (especially unsubscribing), send a message to "gnu-win32-request@cygnus.com" with one line of text: "help".