VMS Help  —  MACRO  /ALPHA  Unary Operators
    A unary operator modifies a term or an expression and indicates
    the action to be performed on that term or expression.
    Expressions modified by unary operators must be enclosed in
    angle brackets. You can use unary operators to indicate whether
    a term or expression is positive or negative. If unary plus or
    minus is not specified, the default value is plus. In addition,
    unary operators perform radix conversion and numeric control
    operations, as described in the following sections.

    Table 3 Summary of Unary Operators

    Unary  Operator
    OperatoName       Example  Operation

    +      Plus       +A       Results in the positive value of A.
           sign
    -      Minus      -A       Results in the negative (two's
           sign                complement) value of A.
    \      Value of   \symbol  Indicates that the value of the symbol
           Escape              should be used. In a string literal,
                               indicates an escape sequence. For
                               example:
                               "Bob\X0A"
    ^A or  ASCII      ^A       Specifies an ASCII constant.
    ^a                /ABCD/
    ^B or  Binary     ^B1100011Specifies that 11000111 is a binary
    ^b                         number.
    ^D or  Decimal    ^D127    Specifies that 127 is a decimal
    ^d                         number.
    ^O or  Octal      ^O34     Specifies that 34 is an octal number.
    ^o
    ^X or  Hexadecimal^XFCF9   Specifies that FCF9 is a hexadecimal
    ^x                         number.
    ^C or  Complement ^C24     Produces the one's complement value of
    ^c                         24 (decimal).

1  –  Radix Control Operators

    Radix control operators determine the radix of a term or
    expression. MACRO-64 accepts terms or expressions in four
    different radixes: binary, decimal, octal, and hexadecimal. The
    default radix is decimal.
    FORMATS

    ^Bnn
    ^Dnn
    ^Onn
    ^Xnn

 nn

    A string of characters that is legal in the specified radix. The
    following are the legal characters for each radix:

           Radix
    Format Name       Legal Characters

    ^Bnn   Binary     0 and 1
    ^Dnn   Decimal    0 to 9
    ^Onn   Octal      0 to 7
    ^Xnn   Hexadecimal0 to 9 and A to F

    You can include radix control operators in the source program
    anywhere a numeric value is legal. A radix control operator
    affects only the term immediately following it, causing that
    term to be evaluated in the specified radix. For example:

    .WORD   ^B00001101              ; Binary radix
    .WORD   ^D123                   ; Decimal radix (default)
    .WORD   ^O47                    ; Octal radix

    Do not place spaces or tabs between the circumflex (^), the radix
    specifier (B, D, O, or X), or the numeric value.

2  –  Numeric Complement Operator

    The complement operator (^C)  produces the one's complement of
    the specified value.

    FORMAT
    ^Cterm

 term

    Any term or expression. If an expression is specified, it must be
    enclosed in angle brackets.

    MACRO-64 evaluates the term or expression as an 8-byte value
    before complementing it. For example:

    .LONG      ^C^XFF      ; Produces FFFFFF00 (hex)
    .LONG      ^C25        ; Produces complement of
                           ;   25 (dec) which is
                           ;   FFFFFFE6 (hex)
Close Help