From: "A. Sinan Unur" Newsgroups: comp.os.msdos.djgpp Subject: Re: #elif Date: 8 Oct 2001 13:57:13 GMT Organization: Cornell University Lines: 48 Sender: asu1 AT cornell DOT invalid (on 128.253.251.163) Message-ID: References: NNTP-Posting-Host: 128.253.251.163 X-Trace: news01.cit.cornell.edu 1002549433 8776 128.253.251.163 (8 Oct 2001 13:57:13 GMT) X-Complaints-To: usenet AT news01 DOT cit DOT cornell DOT edu NNTP-Posting-Date: 8 Oct 2001 13:57:13 GMT User-Agent: Xnews/4.06.22 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Radical NetSurfer wrote in news:ih93stoj99pee2ok0rahub3ois3fi3pga3 AT 4ax DOT com: > Which is proper: depends on what you want to do ... compile and run the following: #include #define SYMBOL 0 int main(void) { #if SYMBOL printf("#if SYMBOL\n"); #elif defined(SYMBOL) printf("#if defined(SYMBOL)\n"); #endif return 0; } incidentally, this is not a djgpp question. > ... > #elif SYMBOL > ... > > or instead: > > #elif defined(SYMBOL) > ... > > the first seems to work without the defined() > > and SYMBOL is a manifest constant: > #define SYMBOL something > > thanks... > > > -- -------------------------------- A. Sinan Unur http://www.unur.com/