Assembly Language Help (alang.hlp) (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
Substitution Operator (&)
                                             Up Contents Index Back
────────────────────────────────────────────────────────────────────────────
 
  Syntax:   &parameter&
 
  See also: Bit Test Operator (&), Expression Operator (%),
            Escape Character (!), MASM 5.1 Compatibility
 
  Description:
 
     Operator used within a macro or a repeat block; enables parameter
     substitution for <parameter>. Two parameters can be joined to form
     one symbol. You can join any number of parameters with the
     ampersand operator.
 
     You can also use this operator to force parameter substitution in
     a quoted string. For this reason, if you want an ampersand to be
     included in a string, you must use the string escape character (!)
     before the &.
 
     Use ampersands (&) only around macro parameters, in quoted strings,
     and inside angle brackets (<>). Each parameter to be substituted
     must have one ampersand on the left and right. If an ampersand is
     adjacent to white space, it can be omitted as long as one
     ampersand is next to each parameter to be substituted.
 
  Example:
 
     Guard    MACRO     Prisonernum:REQ, Prisonername:=Anonymous
                        ECHO    <Number &Prisonernum has arrived at &@Time.>
              EXITM     Prisonernum&&Prisonername
              ENDM
 
     Badge    Guard     2
                                    -♦-