Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utcs!mnetor!seismo!husc6!harvard!panda!genrad!decvax!decwrl!pyramid!hplabs!hp-sdd!ncr-sd!ncrcae!ncsu!uvacs!edison!jso From: jso@edison.UUCP Newsgroups: net.lang.c Subject: Re: #if foo vs #if defined(foo) Message-ID: <819@edison.UUCP> Date: Mon, 7-Jul-86 13:20:58 EDT Article-I.D.: edison.819 Posted: Mon Jul 7 13:20:58 1986 Date-Received: Sat, 12-Jul-86 06:13:41 EDT References: <1586@brl-smoke.ARPA> <379@twitch.UUCP> Organization: General Electric Company, Charlottesville, VA Lines: 21 Keywords: cpp #if In article <379@twitch.UUCP>, grt@twitch.UUCP ( G.R.Tomasevich) writes: > #if squat||foo > > if the 'cc' command includes either '-Dsquat' or '-Dfoo', then 'yes' is > selected, else 'no' is selected. E.g.: 'cc -Dfoo -E c.c' > George Tomasevich, ihnp4!twitch!grt Fine, since -Dfoo is the same as '#define foo 1', but what about #define foo or #define foo something Do either of these work with #if squat||foo ? I doubt it, since the #if is a *numeric* if. John Owens @ General Electric Company (+1 804 978 5726) edison!jso%virginia@CSNet-Relay.ARPA [old arpa] edison!jso@virginia.EDU [w/ nameservers] jso@edison.UUCP [w/ uucp domains] {cbosgd allegra ncsu xanth}!uvacs!edison!jso [roll your own]