Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何在其他宏的定义中引用宏的参数?
例如,FOO(abc) 是一个宏。假设我想编写一些其他宏“BAR”,它首先检查 FOO 的参数,如果是“abc”,则扩展为一行,如果不是,则扩展为另一行。
BAR(如果 FOO_arg 是 abc) {做这个} else {做这个}
如何使用 m4 宏来实现?