delorie.com/archives/browse.cgi | search |
From: | "A. Sinan Unur" <asu1 AT cornell DOT edu> |
Newsgroups: | comp.os.msdos.djgpp |
Subject: | Re: #elif <Symbol> |
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: | <Xns913465407A3DCASINANUNUR@132.236.56.8> |
References: | <ih93stoj99pee2ok0rahub3ois3fi3pga3 AT 4ax DOT com> |
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 <stdio.h> #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/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |