'\^Q' as an escape for control characters

mark at cbosgd.UUCP mark at cbosgd.UUCP
Mon Jun 6 12:46:39 AEST 1983


The ^X notation is very useful in ASCII, but meaningless in some
other character set.  C does not assume ASCII (although it does
assume a newline character, which is a pretty significant assumption).
There is an EBCDIC implementation of C.  Thus, the octal escape seems
like a more appropriate mechanism, although it is a pain for us programmers.
You could always use
	#define CTRL(x) ('x' & 037)

As to the EMACS documentation, why do you assume that \^X is a 3
character sequence?  I would interpret that as the two character
sequence backslash control-X (since, for typographical reasons,
it's hard to print a control X character on a piece of paper).



More information about the Comp.lang.c mailing list