Path: utzoo!utgpu!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!uflorida!novavax!proxftl!twwells!bill From: bill@twwells.uucp (T. William Wells) Newsgroups: comp.lang.c Subject: Re: #defines with parameters [was :Re: v05i053: A "safe" ... ] Message-ID: <212@twwells.uucp> Date: 27 Nov 88 07:09:55 GMT References: <674@quintus.UUCP> <117@halcdc.UUCP> <468@auspex.UUCP> <122@halcdc.UUCP> <1988Nov22.170953.24489@utzoo.uucp> <264@aber-cs.UUCP> Reply-To: bill@twwells.UUCP (T. William Wells) Distribution: eunet,world Organization: None, Ft. Lauderdale Lines: 35 Summary: Expires: Sender: Followup-To: Keywords: In article <264@aber-cs.UUCP> pcg@cs.aber.ac.uk (Piercarlo Grandi) writes: : Now I have always had a low opinion of the X3J11 work (e.g. not to : realize that unsigned and int are different types, as they obey : different rules for arithmetic, and char short and long are just : range/length modifiers, and not the other way round), but this last : idea really leaves me gasping... : : Obviously there must me a way to distinguish between macro bodies that : begin with a "(" and macro definitions with a parameter list, is there : one ? Judging by this evidence, your opinion of X3J11 is based on misinformation. Firstly, they do indeed have unsigned and ints as different types. (And I can't figure out whatever you meant by `char short', etc. but they haven't really changed anything there either.) Secondly, they have done nothing to change the way that parentheses are used when defining a macro. A macro with arguments gets defined with: #define () where either or may be null. White space must not appear between the and the open parenthesis. A macro with no arguments get defined with: #define and there must be white space between and . --- Bill {uunet|novavax}!proxftl!twwells!bill