DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

(m4.info) Macro Arguments

Info Catalog (m4.info) Inhibiting Invocation (m4.info) Macros (m4.info) Quoting Arguments
 
 Macro arguments
 ===============
 
    When a name is seen, and it has a macro definition, it will be
 expanded as a macro.
 
    If the name is followed by an opening parenthesis, the arguments
 will be collected before the macro is called.  If too few arguments are
 supplied, the missing arguments are taken to be the empty string.  If
 there are too many arguments, the excess arguments are ignored.
 
    Normally `m4' will issue warnings if a builtin macro is called with
 an inappropriate number of arguments, but it can be suppressed with the
 `-Q' command line option.  For user defined macros, there is no check
 of the number of arguments given.
 
    Macros are expanded normally during argument collection, and whatever
 commas, quotes and parentheses that might show up in the resulting
 expanded text will serve to define the arguments as well.  Thus, if FOO
 expands to `, b, c', the macro call
 
      bar(a foo, d)
 
    is a macro call with four arguments, which are `a ', `b', `c' and
 `d'.  To understand why the first argument contains whitespace,
 remember that leading unquoted whitespace is never part of an argument,
 but trailing whitespace always is.
 
Info Catalog (m4.info) Inhibiting Invocation (m4.info) Macros (m4.info) Quoting Arguments
automatically generated byinfo2html