Subject: Re: long long vs long
From: [email-masked] (Earnie Boyd)

25 Jul 1998 00:01:28 -0700
Message-ID: <[email-masked]>
Reply-To: [email-masked]
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
To: gw32 <[email-masked]>, sjm <[email-masked]>

---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----
[email-masked]
------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
"[email-masked]" with one line of text: "help".