以下のマクロは,引用符のレベルを追加したり削除したりすることで,評価の順 序全体を制御するものです.それらは,ハードコアなM4プログラマに対して意味 があります.
以下の例は,(i)これらの例を使用していない,(ii)m4_quote
を使用して
いる,(iii)m4_dquote
を使用している,といったそれぞれの間の差を強
調することを目的としています.
$ cat example.m4 # Overquote, 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]]