Article View: net.lang.c
Article #9693Re: CTRL(x)
From: Col. G. L. Sicherman
Date: Fri, 31 Oct 1986 16:41
Date: Fri, 31 Oct 1986 16:41
16 lines
1011 bytes
1011 bytes
) >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
Technical Details
Message-ID:
<1319@sunybcs.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!mnetor!seismo!columbia!rutgers!clyde!watmath!sunybcs!colonelReferences:
<4880@brl-smoke.ARPA>Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: arc1-ca.pugleaf.net!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