OT: Requesting C advice

Alan Cox alan at lxorguk.ukuu.org.uk
Thu May 24 10:38:05 UTC 2007


> The DEC KAL10 stored 5 characters in a 36 bit word with one bit
> left over for anything you wanted to do with it! It used 7 bit ASCII,
> of course.

Or 6 BCD characters or 4 8 (as 9) bit ASCII values. Ditto the Honeywell
L66. Character width as a compile option.

Be very glad that today you don't have to fight that kind of thing. Don't
however assume in portable code that int is 32bits, long is 32bits,
pointers are 32bits and so on. C99 has proper types when you need to be
specific.

Also be aware that some Linux ports have char as unsigned by default and
others as signed. 

Alan




More information about the fedora-list mailing list