HELPLIB.HLB  —  MACRO  /ALPHA  Macros  Passing Numeric Values of Symbols
    When a symbol is specified as an actual argument, the name of
    the symbol, not the numeric value of the symbol, is passed to
    the macro. You can pass the value of the symbol by inserting a
    backslash (\) before the symbol in the macro call. The assembler
    passes the characters representing the decimal value of the
    symbol to the macro. For example, if the symbol COUNT has a value
    of 2 and the actual argument specified is \COUNT, the assembler
    passes the string 2 to the macro; it does not pass the name of
    the symbol, COUNT.

    Passing numeric values of symbols is especially useful with the
    apostrophe (')  concatenation operator for creating new symbols.

    An example of a macro definition for passing numeric values of
    symbols follows:

            .MACRO WORD n
    WORD'n: .WORD n
            .ENDM WORD

    The following example shows a possible call and expansion of the
    macro previously defined:

           X = 1       ; Start counting at 1
           WORD \X
    WORD1: .WORD 1
Close Help