Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!gem.mps.ohio-state.edu!apple!claris!sts!cohesive!megatest!djones From: djones@megatest.UUCP (Dave Jones) Newsgroups: comp.std.c Subject: Re: What is a constant expression Message-ID: <8891@goofy.megatest.UUCP> Date: 20 Oct 89 22:40:41 GMT References: <1219@crdos1.crd.ge.COM> Organization: Megatest Corporation, San Jose, Ca Lines: 22 From article <1219@crdos1.crd.ge.COM>, by davidsen@crdos1.crd.ge.COM (Wm E Davidsen Jr): > ... > Background: large program, defines ASCII control characters with a > macro as follows: > #define CNTL(c) ('c' & 037) > While this work fine with pcc, the ANSI preprocessor doesn't expand it. How about #define CNTL(c) ((c) & 037) Then change all occurances of the form CNTL(x) into CNTL('x') (Use an AWK program to automate things, if there's a bunch of them.) Ain't that the "right" way to do it?