[Icc-avr] history of c

BobGardner at aol.com BobGardner at aol.com
Sun Apr 27 08:40:21 PDT 2008


Is there a technical reason that char functions like putchar tend to  promote 
the chars to ints? putchar and getchar have 'always' had a return type  of 
int. Some of this 'tradition' has to do with a historical desire to make  
everything an integer so it will run fast on a pdp11 I guess, but if I make a  
mistake and return a char instead of an int, does something break? Does the  wrong 
half of the int get used as the return value if there is a size mismatch?  I 
can see how you can return a char in an int, but how do you return an int in a  
char? What gets returned? The hi byte or the lo byte?



**************Need a new ride? Check out the largest site for U.S. used car 
listings at AOL Autos.      
(http://autos.aol.com/used?NCID=aolcmp00300000002851)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://dragonsgate.net/pipermail/icc-avr/attachments/20080427/6947461d/attachment.html


More information about the Icc-avr mailing list