Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rlgvax!hadron!jsdy From: jsdy@hadron.UUCP (Joseph S. D. Yao) Newsgroups: comp.lang.c Subject: Re: CTRL(x) Message-ID: <614@hadron.UUCP> Date: Wed, 12-Nov-86 23:46:44 EST Article-I.D.: hadron.614 Posted: Wed Nov 12 23:46:44 1986 Date-Received: Thu, 13-Nov-86 04:00:35 EST References: <4880@brl-smoke.ARPA> <1319@sunybcs.UUCP> Reply-To: jsdy@hadron.UUCP (Joseph S. D. Yao) Organization: Hadron, Inc., Fairfax, VA Lines: 14 Summary: (x^0100) incorrect In article <1319@sunybcs.UUCP> colonel@sunybcs.UUCP (Col. G. L. Sicherman) writes: >) >But. . .is there a way to write an ANSI cpp version of >) > #define CTRL(c) > ... What's wrong with this old trick? > #define Q " > #define CTRL(z) (Q z "[1]^0100) The XOR, (x^0100), will not generally work. Use (x&037). Also, there was some concern that "..."[x] will not work where a constant is required, such as in a case statement. -- Joe Yao hadron!jsdy@seismo.{CSS.GOV,ARPA,UUCP} jsdy@hadron.COM (not yet domainised)