char constant?

Chris Torek chris at mimsy.UUCP
Fri Apr 15 12:39:30 AEST 1988


In article <5206 at ihlpg.ATT.COM> tainter at ihlpg.ATT.COM (Tainter) writes:
-Is
-    "ABCD"[0]
-legal ANSI C?

Yes.  It is not, however, a constant expression (see section 3.4).

-If so then
-    (#x[0])
-becomes a 'charize' expression equivalent to a direct charize operator for
-all intents and purposes.

No.  For instance, "C"[0] is not legal as a case label.
-- 
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163)
Domain:	chris at mimsy.umd.edu	Path:	uunet!mimsy!chris



More information about the Comp.lang.c mailing list