Null revisited (briefly)
Mark Nagel
nagel at blanche.ics.uci.edu
Wed Mar 1 16:15:35 AEST 1989
In article <1783 at dlvax2.datlog.co.uk>, scm at datlog ( Steve Mawer ) writes:
|In article <10138 at socslgw.csl.sony.JUNET> diamond at diamond. (Norman Diamond) writes:
|>
|>When you assign 'x' to a character, you are assigning an int to a
|>character. The reader knows that the type mismatch was intentional.
|
|Not if he knows the C language. A single character written within
|single quotes is a *character constant*. This isn't an int.
If you knew the C language, you'd know that a character constant *is*
an integer. See K&R page 17 and 35.
Mark Nagel @ UC Irvine, Dept of Info and Comp Sci
ARPA: nagel at ics.uci.edu | Charisma doesn't have jelly in the
UUCP: {sdcsvax,ucbvax}!ucivax!nagel | middle. -- Jim Ignatowski
More information about the Comp.lang.c
mailing list