Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utcs!mnetor!seismo!lll-crg!caip!brl-adm!brl-smoke!brl-sem!ron From: ron@brl-sem.UUCP Newsgroups: net.lang.c Subject: Re: #if foo vs #if defined(foo) Message-ID: <344@brl-sem.ARPA> Date: Sat, 12-Jul-86 15:10:37 EDT Article-I.D.: brl-sem.344 Posted: Sat Jul 12 15:10:37 1986 Date-Received: Sat, 12-Jul-86 23:12:49 EDT References: <1586@brl-smoke.ARPA> <379@twitch.UUCP> Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 17 Keywords: Sys 5.2 In article <379@twitch.UUCP>, grt@twitch.UUCP ( G.R.Tomasevich) writes: > Our compiler does not need a defined(), or at least I did not try whether > it is even accepted. The following example works fine: > > #if squat||foo Consider an optionally included definition #define SQUAT 0 If your code really wanted to check for this then the proper test would be #if defined(SQUAT) && (squat == 0) to differentiate between undefined SQUAT and SQUAT defined but equal to zero.