Why all this fuss about CTRL(X) ??

jmsellens at watdragon.UUCP jmsellens at watdragon.UUCP
Fri Dec 5 09:12:20 AEST 1986


There seems to have been a long and somewhat futile discussion about
a macro to give control characters.  Some say use "CTRL(X)", some
say "CTRL('X')".  Here's a wonderful way, that is guaranteed to
be portable, easy to type, and easy to understand.

Make a file called ctrl.h with lines like
#define CTRLA	'\001'
in it (should take mere seconds).  Put #include "ctrl.h" in your
C source files and use CTRLA.  No fuss, no muss.  Easy to understand.
Portable. And it even works.



More information about the Comp.lang.c mailing list