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 |
|
|
Decrement a field. Can be used alone or as part of an expression. The
form |
|
2 |
|
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 |
|
|
Begins with (alphanumeric expressions) |
|
|
Contains (alphanumeric expressions) |
|
|
Ends with (alphanumeric expressions) |
|
7 |
|
Logical and |
8 |
|
Logical or |