CTRL(x) macro (was: Re: What is a constant expression)

Maarten Litmaath maart at cs.vu.nl
Tue Oct 24 04:19:35 AEST 1989


djones at megatest.UUCP (Dave Jones) writes:
\...
\#define CNTL(c) ((c) & 037)

I prefer:

	#define CTRL(x) ((x) ^ 0100)

...so you can say

	CTRL('?')

to get DEL.
-- 
A symbolic link is a POINTER to a file, | Maarten Litmaath @ VU Amsterdam:
 a hard link is the file system's GOTO. | maart at cs.vu.nl, mcsun!botter!maart



More information about the Comp.lang.c mailing list