本文介绍了GNU M4:扩展方括号内的文字吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我跑步:

define(`[x]`,`y')
[x]
=>[x]

什么也没有发生..有没有办法在M4中扩展括号?

Nothing happens.. Is there a way to expand brackets in M4?

推荐答案

如果定义的宏名称包含非字母数字字符,则扩展其内容的唯一方法是使用defn()内置宏:

If the name of the macro that you have defined contains non-alphanumeric characters the only way to expand its content is by using the defn() built-in macro:

define(`[x]',`y')
defn(`[x]')
=> y

这篇关于GNU M4:扩展方括号内的文字吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-23 10:36
查看更多