In reply to mlsxdx:
- The LRM says: “The macro text and argument defaults may contain usages of other text macros. Such usages shall be substituted after the outer macro is substituted, not when it is defined”. So the macro SN needs to be defined at the point when it gets expanded my the call to the NAME macro in the module body.
- The LRM also says: “An `” overrides the usual lexical meaning of " and indicates that the expansion shall include the quotation mark, substitution of actual arguments, and expansions of embedded macros." So the PATH argument needs to get expanded before it gets encapsulated by the quotes. The correct expansion is “tom_ma”
- Your EDAPlayground example has the macro definitions compiled in a separate file from the module declaration that uses them. Some tools treat the two files as separate compilation units and macros defined in one compilation unit are not visible in other compilation units. Typically macros definition files are `included into the compilation unit.