Path: utzoo!attcan!uunet!mcvax!ukc!etive!aiai!richard From: richard@aiai.ed.ac.uk (Richard Tobin) Newsgroups: comp.lang.c Subject: Character constants Keywords: NULL Message-ID: <217@skye.ed.ac.uk> Date: 28 Feb 89 18:53:59 GMT References: <13068@steinmetz.ge.com> <102@servio.UUCP> <10138@socslgw.csl.sony.JUNET> <1783@dlvax2.datlog.co.uk> Reply-To: richard@aiai.UUCP (Richard Tobin) Organization: AIAI, University of Edinburgh, Scotland Lines: 19 In article <1783@dlvax2.datlog.co.uk> scm@datlog.co.uk ( Steve Mawer ) writes: >Not if he knows the C language. A single character written within >single quotes is a *character constant*. This isn't an int. K&R, p180: The value of a character constant is the numerical value of the character in the machine's character set. Draft proposed ANSI standard (May 13, 1988) Section 3.1.3.4 (p29): An integer character constant has type int. ["integer character constant" constrasts with "wide character constant"] -- Richard -- Richard Tobin, JANET: R.Tobin@uk.ac.ed AI Applications Institute, ARPA: R.Tobin%uk.ac.ed@nss.cs.ucl.ac.uk Edinburgh University. UUCP: ...!ukc!ed.ac.uk!R.Tobin