On Fri, 8 Sep 2000, John Summerfield wrote:

>The whole idea of naming a numeric datatype "int" was a pretty poor idea. 
>"long int" etc are little better. I prefer PL/1's fixed bin(31) - one defines 
>the sice of the fixed-point number (31 bits plus sign) and representation 
>(binary). It also allows decimal rather than binary, and float rather than 
>fixed.

Yeah, and in FORTRAN you declare the bytelength too.
the idea behind an "int" is for the compiler to choose the
architectures native integer format.  That way it will be most
optimal.  Lots of code just needs an integer of which the size is
not important, so long as it is at least X bytes big.  In such
code, it is safe to assume only that int is 16 bits really.

If full portability is required however, one should use all
typedef'd types and iron out differences in header files.

>I C you can't be sure of anything; even a char might not be
>eight bits if the underlying hardware doesn't support it. I
>don't know whether there IS any such contemporary hardware, but
>it used to exist.

Yeah exactly.  Header files reign supreme here.  It would be nice
if there were fixed size types built into C too though.


--
Mike A. Harris  -  Computer Consultant  -  Capslock Consulting
Linux advocate, Open source advocate | Copyright 2000 all rights reserved
     ===============================================================
#[Mike A. Harris bash tip #3 - how to disable core dumps]
# Put the following at the bottom of your ~/.bash_profile
ulimit -c 0



_______________________________________________
Redhat-devel-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-devel-list

Reply via email to