Share via


Macro Substitution

 

The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

The latest version of this topic can be found at Macro Substitution.

When macroname is invoked, each occurrence of string1 in its definition string is replaced by string2.

Syntax

$(macroname:string1=string2)  

Remarks

Macro substitution is case sensitive and is literal; string1 and string2 cannot invoke macros. Substitution does not modify the original definition. You can substitute text in any predefined macro except $$@.

No spaces or tabs precede the colon; any after the colon are interpreted as literal. If string2 is null, all occurrences of string1 are deleted from the macro's definition string.

See Also

Using an NMAKE Macro