11 binary operators – ARM VERSION 1.2 User Manual

Page 106

Advertising
background image

Assembler Reference

3-28

Copyright © 2000, 2001 ARM Limited. All rights reserved.

ARM DUI 0068B

3.6.11

Binary operators

Binary operators are written between the pair of subexpressions they operate on.

Binary operators have lower precedence than unary operators. Binary operators appear
in this section in order of precedence.

Note

The order of precedence is not the same as in C, see Operator precedence on page 3-24.

Multiplicative operators

Multiplicative operators have the highest precedence of all binary operators. They act
only on numeric expressions.

Table 3-5 shows the multiplicative operators.

String manipulation operators

Table 3-6 shows the string manipulation operators.

In the two slicing operators

LEFT

and

RIGHT

:

A

must be a string

B

must be a numeric expression.

In

CC,

A

and

B

must both be strings.

Table 3-5 Multiplicative operators

Operator

Usage

Explanation

*

A*B

Multiply

/

A/B

Divide

MOD

A:MOD:B

A modulo B

Table 3-6 String manipulation operators

Operator

Usage

Explanation

LEFT

A:LEFT:B

The left-most B characters of A

RIGHT

A:RIGHT:B

The right-most B characters of A

CC

A:CC:B

B concatenated onto the end of A

Advertising