<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<body text="#000000" bgcolor="#FFFFFF" link="#0000FF" vlink="#FF0000" alink="#000088">
Because you can't add integers to chars..
<br>Try instead
<br>&nbsp;for (i=0; i&lt; 128; i++)
<br>&nbsp;&nbsp; printf("Char %i: %c\n", i, (char)i);
<br>&nbsp;
<p>Chris Richard Adams wrote:
<blockquote TYPE=CITE>I'd like to view all the ASCII chars on my system.&nbsp;
I tried:
<p>char ch = 'NUL';
<br>int i;
<p>for ( i = 0; i &lt; 500; i++)
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; printf("Char: %c/n", ch
+ i");
<p>This fails.
<p>1.) What is illegal here?
<p>2.) Can I use chars in my for look also...something like:
<p>for ( ch = 'NUL; i &lt; 500; ch++, i++)
<p>Thanks,
<br>Chris
<p>_______________________________________________
<br>Beowulf mailing list, Beowulf@beowulf.org
<br>To change your subscription (digest mode or unsubscribe) visit <a href="http://www.beowulf.org/mailman/listinfo/beowulf">http://www.beowulf.org/mailman/listinfo/beowulf</a></blockquote>

<pre>--&nbsp;
Dr Niels R. Walet&nbsp; <A HREF="http://www.phy.umist.ac.uk/Theory/people/walet.html">http://www.phy.umist.ac.uk/Theory/people/walet.html</A>
Dept. of Physics,&nbsp; UMIST,&nbsp;&nbsp; P.O. Box 88,&nbsp;&nbsp;&nbsp; Manchester,&nbsp; M60 1QD,&nbsp; U.K.
Phone: +44(0)161-2003693 Fax: +44(0)161-2004303 Niels.Walet@umist.ac.uk</pre>
&nbsp;
</body>
</html>