#### 37.1.3 Nesting macros

Within one macro you can invoke another macro, and that macro can invoke another, and so on; you can nest macro invocations to any level. When a macro calls another macro, DITA2Go notes the “nesting level” and compares it with the limit you set:

    [Macros]
    ; MacroNestMax = maximum depth of macro calls in one statement
    ;  used to prevent runaways when macros call each other in circles
    MacroNestMax=128

So if you define a macro as:

    [Again]
    <P>Play it again, Sam.</P><$Again>

you would get at most 128 lines, then DITA2Go would continue. You cannot crash it by making it loop.

Previous Topic: 37.1.2 Invoking a macro

Next Topic: 37.1.4 Using predefined macros

Parent Topic: 37.1 Defining and invoking macros

Sibling Topics:

37.1.1 Defining macros

37.1.2 Invoking a macro

37.1.4 Using predefined macros

Table of Contents • Index