Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!columbia!rutgers!clyde!watmath!sunybcs!colonel From: colonel@sunybcs.UUCP (Col. G. L. Sicherman) Newsgroups: net.lang.c Subject: Re: CTRL(x) Message-ID: <1319@sunybcs.UUCP> Date: Fri, 31-Oct-86 11:41:58 EST Article-I.D.: sunybcs.1319 Posted: Fri Oct 31 11:41:58 1986 Date-Received: Mon, 3-Nov-86 21:10:00 EST References: <4880@brl-smoke.ARPA> Organization: DALEK Reproducing Equipment, Inc. Lines: 16 ) >But. . .is there a way to write an ANSI cpp version of ) > #define CTRL(c) ) ) I don't have an ANSI cpp handy (does anybody?), so I can't test ) this, but how about using the ANSI invention of # for "string-izing": ) #define CTRL(c) (#c[0] & 037) Not everybody has it. What's wrong with this old trick? #define Q " #define CTRL(z) (Q z "[1]^0100) -- Col. G. L. Sicherman UU: ...{rocksvax|decvax}!sunybcs!colonel CS: colonel@buffalo-cs BI: colonel@sunybcs, csdsiche@sunyabvc