ANSI C Question
Doug Moen
kdmoen at watcgl.UUCP
Wed Mar 13 14:59:25 AEST 1985
In response to Robert Herndon's question,
the draft Ansi C standard has this to say about macros and parameter lists:
#define foo (x, y, z) /* define macro with no parameters */
#define bar(x, y, z) /* define macro with 3 parameters */
bar(a, b, c) /* use bar */
bar (a, b, c) /* another way to use bar */
In other words, you can put spaces between the macro name and its
actual parameter list (when you use it), but not between the name and
the formal parameter list (when you define it).
The question probably arose because my original posting wasn't very clear:
> There may be white space between a macro name and the ( )'s enclosing
> its actual parameter list (Unix cpp disallows this).
Doug Moen, watmath!watcgl!kdmoen
University of Waterloo Computer Graphics Lab
More information about the Comp.lang.c
mailing list