Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!burl!ulysses!mhuxr!mhuxn!ihnp4!inuxc!pur-ee!uiucdcs!ccvaxa!aglew From: aglew@ccvaxa.UUCP Newsgroups: net.lang.c Subject: Re: What should be added to C, call Message-ID: <2600062@ccvaxa> Date: Fri, 30-May-86 15:11:00 EDT Article-I.D.: ccvaxa.2600062 Posted: Fri May 30 15:11:00 1986 Date-Received: Sun, 1-Jun-86 10:13:44 EDT References: <36@mit-prep.ARPA> Lines: 38 Nf-ID: #R:mit-prep.ARPA:36:ccvaxa:2600062:000:1406 Nf-From: ccvaxa.UUCP!aglew May 30 14:11:00 1986 >>>> o The ability to define multi-line pre-processor macros, using #begdef and >>>> #enddef statements. #if and other conditionals in the body of the >>>> definition would be evaluated when the macro was not interpreted, not when >>>> it is encountered. >>> >>>Why would you want to use it? >> >>When your macro won't fit on a line, and/or you want to use #if's etc >>as part of the macro, obviously. > >If your macro won't fit on a line, you can already handle this problem by >finishing off each line except the last with a backslash. >The other addition would be a win, though. Sorry, backslashes don't help macros that I want to have conditional sections of code in. Eg. I can't do #define debugf(parmlist) \ #ifdef DEBUG \ printf parmlist \ #else \ /* nothing */ \ #endif I have to embed the #define within the #if instead. NB. I can't even do this if I finish each line by \\\, unfortunately. However, if you're going to have a multiline macro sequence, it would be nice to have some way of distinguishing conditionals that I want evaluated when the macro is recognized from conditionals that I want evaluated at macro use time. All of these problems have been solved a hundred times in various macro languages - the solutions are all #######iffy. Andy "Krazy" Glew. Gould CSD-Urbana. USEnet: ihnp4!uiucdcs!ccvaxa!aglew 1101 E. University, Urbana, IL 61801 ARPAnet: aglew@gswd-vms