Table of operators

Sculptor supports a comprehensive set of arithmetical and relational operators. These may be used to form expressions involving record fields, temporary fields and constants.

A table of the operators is shown below, in descending order of precedence. Operators with equal precedence are grouped together.

In an expression without parentheses (“()”), operators with higher precedence are evaluated first; those with equal precedence are evaluated from left to right. To force a different order of evaluation, use parentheses. Expressions within parentheses are evaluated first, regardless of precedence.

Group

Operator

Function

1

-

Negation (unary minus)

++

Increment a field. Can be used alone or as part of an expression. The form ++field_id adds 1 to the value of field_id before using its value; field_id++ adds 1 after using its value.

--

Decrement a field. Can be used alone or as part of an expression. The form –-field_id subtracts 1 from the value of field_id before using its value; field_id–- subtracts 1 after using its value.

2

not

Logical not

~

Bitwise not

3

*

Multiplication

/

Division (numeric expressions); string concatenation, with trailing spaces removed from the left operand (alphanumeric expressions)

%

Modulus (remainder after integer division)

4

+

Addition (numeric expressions); string concatenation, with trailing spaces on the left operand preserved (alphanumeric expressions)

--

Subtraction

5

&

Bitwise and

|

Bitwise or

^

Bitwise exclusive or

6

=

Equal to, or assignment

==

Equal to (not assignment)

<

Less than

<=

Less than or equal to

>

Greater than

>=

Greater than or equal to

<>

Not equal to

!=

Not equal to

?=

Same object

bw

Begins with (alphanumeric expressions)

ct

Contains (alphanumeric expressions)

ew

Ends with (alphanumeric expressions)

7

and

Logical and

8

or

Logical or