如何使用嵌套定义唯一参数?
define(`Honestly',`$1, define(`Does',`Iam$1')Does(Honest), $2')dnl
Honestly(Before, After)
实际结果:
Before, IamBefore, After
预期结果:
Before, IamHonest, After
如何达到预期结果?
分解$1
令牌:
define(`Honestly',`$1, define(`Does',`Iam$'`1')Does(Honest), $2')dnl
Honestly(Before, After)
移除define
:周围的记号
define(`Honestly',$1-define(`Does',`Iam$1')Does(Honest)-$2)dnl
Honestly(Before, After)