Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!princeton!caip!brl-adm!brl-smoke!smoke!rgenter@BBN-LABS-B.ARPA From: rgenter@BBN-LABS-B.ARPA (Rick Genter) Newsgroups: net.lang.c Subject: Re: microsoft C considered stupid Message-ID: <1586@brl-smoke.ARPA> Date: Mon, 23-Jun-86 10:11:12 EDT Article-I.D.: brl-smok.1586 Posted: Mon Jun 23 10:11:12 1986 Date-Received: Wed, 25-Jun-86 05:21:41 EDT Sender: news@brl-smoke.ARPA Lines: 37 Actually, the defined() preprocessor function does provide a convenience over #ifdef in one specific case: #if defined(VAX730) || defined (VAX750) || defined (VAX780) < code which is included when any of the three symbols are defined > #endif /* defined ... */ This is a royal pain to accomplish with #ifdef: #undef KLUDGE #ifdef VAX730 #define KLUDGE #endif /* def VAX730 */ #ifdef VAX750 #define KLUDGE #endif /* def VAX750 */ #ifdef VAX780 #define KLUDGE #endif /* def VAX780 */ #ifdef KLUDGE < code which is included when any of the three symbols are defined > #endif /* def KLUDGE */ Alternatively, you have to include the code three times. - Rick -------- Rick Genter BBN Laboratories Inc. (617) 497-3848 10 Moulton St. 6/506 rgenter@labs-b.bbn.COM (Internet new) Cambridge, MA 02238 rgenter@bbn-labs-b.ARPA (Internet old) linus!rgenter%BBN-LABS-B.ARPA (UUCP)