GNU Info

Info Node: (autoconf.info)Evaluation Macros

(autoconf.info)Evaluation Macros


Next: Forbidden Patterns Prev: Redefined M4 Macros Up: Programming in M4sugar
Enter node , (file) or (file)node

Evaluation Macros
-----------------

   The following macros give some control over the order of the
evaluation by adding or removing levels of quotes.  They are meant for
hard core M4 programmers.

 - Macro: m4_dquote (ARG1, ...)
     Return the arguments as a quoted list of quoted arguments.

 - Macro: m4_quote (ARG1, ...)
     Return the arguments as a single entity, i.e., wrap them into a
     pair of quotes.

   The following example aims at emphasing the difference between (i),
not using these macros, (ii), using `m4_quote', and (iii), using
`m4_dquote'.

     $ cat example.m4
     # Over quote, so that quotes are visible.
     m4_define([show], [$[]1 = [$1], $[]@ = [$@]])
     m4_divert(0)dnl
     show(a, b)
     show(m4_quote(a, b))
     show(m4_dquote(a, b))
     $ autom4te -l m4sugar example.m4
     $1 = a, $@ = [a],[b]
     $1 = a,b, $@ = [a,b]
     $1 = [a],[b], $@ = [[a],[b]]


automatically generated by info2www version 1.2.2.9