| |||
| Home > Symbols, Literals, Expressions, and Operators > Unary operators | |||
Unary operators have the highest precedence and are evaluated first. A unary operator precedes its operand. Adjacent operators are evaluated from right to left.
Table 27 lists the unary operators that return strings.
Table 27. Unary operators that return strings
Operator | Usage | Description |
|---|---|---|
|
| Returns the character with ASCII code A. |
:LOWERCASE: | :LOWERCASE:string | Returns the given string, with all uppercase characters converted to lowercase. |
:REVERSE_CC: | :REVERSE_CC:cond_code | Returns the inverse of the condition code in cond_code,
or an error if cond_code does not contain a valid
condition code. |
|
| Returns an 8-digit hexadecimal string
corresponding to a numeric expression, or the string |
:UPPERCASE: | :UPPERCASE:string | Returns the given string, with all lowercase characters converted to uppercase. |
Table 28 lists the unary operators that return numeric values.
Table 28. Unary operators that return numeric or logical values
| Operator | Usage | Description |
|---|---|---|
|
| Number of bytes of executable code generated by line defining symbol A. |
|
| Unary plus. Unary minus. + and - can act on numeric and PC-relative expressions. |
|
| If A is a PC-relative or register-relative
expression, |
:CC_ENCODING: | :CC_ENCODING:cond_code | Returns the numeric value of the condition
code in cond_code, or an error if cond_code does
not contain a valid condition code. |
|
| { |
|
| If A is a register-relative expression, |
|
| Length of string A. |
|
| Logical complement of A. |
|
| Bitwise complement of A ( |
:RCONST: | :RCONST:Rn | Number of register, 0-15 corresponding to R0-R15. |