<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 10 (filtered)">
<style>
<!--
/* Font Definitions */
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:blue;
        text-decoration:underline;}
span.EmailStyle17
        {font-family:Arial;
        color:navy;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
-->
</style>
</head>
<body lang=EN-US link=blue vlink=blue id="role_body" bottomMargin=7
leftmargin=7 topmargin=7 rightMargin=7>
<div class=Section1>
<p class=MsoNormal><font size=2 color=navy face=Arial id="role_document"><span
style='font-size:10.0pt;font-family:Arial;color:navy'>I believe that putchar
and getchar return int, because they have to be able to return EOF and EOF is
an int.</span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'> </span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>ICC will just give you the lsb if you cast
an int to a char, but I think you’ll loose the ability to distinguish
between EOF and a normal character.</span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'> </span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>-Mike</span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'> </span></font></p>
<p class=MsoNormal><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma'>-----Original Message-----<br>
<b><span style='font-weight:bold'>From:</span></b>
icc-avr-bounces@imagecraft.com [mailto:icc-avr-bounces@imagecraft.com] <b><span
style='font-weight:bold'>On Behalf Of </span></b>BobGardner@aol.com<br>
<b><span style='font-weight:bold'>Sent:</span></b> </span></font><font size=2 face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'>Sunday, April
27, 2008</span></font><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma'> </span></font><font size=2 face=Tahoma><span
style='font-size:10.0pt;font-family:Tahoma'>8:40 AM</span></font><font size=2
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'><br>
<b><span style='font-weight:bold'>To:</span></b> icc-avr@imagecraft.com<br>
<b><span style='font-weight:bold'>Subject:</span></b> [Icc-avr] history of c</span></font></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'> </span></font></p>
<div>
<p class=MsoNormal><font size=2 color=black face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:black'>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?</span></font></p>
</div>
<p class=MsoNormal style='margin-bottom:12.0pt'><font size=2 color=black
face=Arial><span style='font-size:10.0pt;font-family:Arial;color:black'><br>
<br>
</span></font></p>
<div>
<div class=MsoNormal align=center style='text-align:center'><font size=2
color=black face=Arial><span style='font-size:10.0pt;font-family:Arial;
color:black'>
<hr size=2 width="100%" align=center>
</span></font></div>
<p class=MsoNormal><font size=2 color=black face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:black'>Need a new ride? Check out the largest
site for U.S. used car listings at <a
href="http://autos.aol.com/used?NCID=aolcmp00300000002851" target="_blank"
title="http://autos.aol.com/used?NCID=aolcmp00300000002851">AOL Autos</a>.</span></font></p>
</div>
</div>
</body>
</html>