Why all this fuss about CTRL(X) ??

Paul Sutcliffe Jr. paul at devon.UUCP
Sun Dec 7 14:27:18 AEST 1986


In article <1955 at watdragon.UUCP>, jmsellens at watdragon.UUCP (John M. Sellens) writes:
> 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.

That's fine if you know ahead of time what control characters you 
want to play with.  However, if I want to find the ``control'' value
of a variable, as in:

	foo()
	{
		char	c, cc;
		...
		cc = CTRL(c);
		...
	}

then your method, although good for what it was intended, won't do.

-Paul

-- 
Paul Sutcliffe, Jr.	 UUCP: {seismo,ihnp4,allegra,rutgers}!cbmvax!devon!paul
Devon Computer Services  COMPUSERVE: 76176,502
Allentown, Penna.	 Sarek: "Any message for your mother, Spock?"
+1 215 398 3776 	 Spock: "Yes. Tell her 'I feel fine.'"



More information about the Comp.lang.c mailing list