Template Macros

Top  Previous  Next

Macro Syntax


Macro parameters have to be enclosed double or single quotation marks, or in brackets (in the case where there are multiple parameters to a macro or where the parameters required contain no spaces). If you want to use one of these within a macro parameter when you have already used the respective character as the enclosing one, escape it for the parameter by using a pair instead of a single one:


† %MACRO='my "double quoted" text'

the macro parameter is my "double quoted" text


† %MACRO="my ""double quoted"" text"

is the same only with double quotation marks used throughout.


The Bat! allows special characters not appearing in the parameter string as delimiters, too:


† %MACRO=_my "double quoted" text_
† %MACRO=#my "double quoted" text#


Note: In some cases you are required to use brackets, for example in macros with more than one parameter.

Note: Quotation marks are not required for one-word or one-macro parameters when using brackets to enclose them.



Related topics:


Quick Templates