trigraphs in X3J11

Chris Torek chris at mimsy.UUCP
Wed May 25 07:07:49 AEST 1988


In article <10949 at apple.Apple.Com> lenoil at Apple.COM (Robert Lenoil) writes:
>... why not simply extend the backslash escape mechanism to be valid
>outside of strings?

Backslash is one of the characters that cannot be represented in some
character sets (the trigraph ??/ is a synonym for it in the dpANS).

>This would allow the use of #defines to perform the same function
>as trigraphs:
>
>#define ??< \173	/* open brace */
>#define ??> \175	/* close brace */

This would be almost as big a change as trigraphs; the #define syntax
is now

	# define <identifier><arglist_opt> <replacement-text>

and `??' is not part of an <identifier>.

I think the `#trigraph' suggestion is a suitable way to keep trigraphs
from affecting old code and/or infesting new code.
-- 
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