It's been pointed out to me that I overlooked a whole page in the Uniface manuals which details the order of precedence for operators - how did I miss that? Luckily it agrees with my findings, and adds in a few of the Uniface specific functionality (such as indirection)...
Type
|
Operator
|
Description
|
Precedence
|
Indirection
|
@
|
Field
Indirection
|
1
|
Dereference
|
->Identifier
{ }
|
Struct
Dereference and Operation Activation
Struct
Index
|
2
|
Extraction
|
[ ]
|
Extraction
|
3
|
Indirect
dereference
|
->"SubstitutionString"
|
Dereference
with string substiution
|
4
|
Arithmetic
Operators
|
*
/
%
|
Multiplication
Division
Modulus
|
5
|
+
-
|
Addition
Subtraction
|
6
|
|
Relational
Operators
|
<
<=
!=
=
==
>=
>
|
Less
than
Less
than or equal to
Not
equal to
Equal
to
Equal
to
Greater
than or equal to
Greater
than
|
7
|
Logical
Operators
|
!
|
Logical
NOT
|
8
|
&
|
Logical
AND
|
9
|
|
|
|
Logical
OR
|
10
|
Thanks to Dave R for pointing this out to me.
Summary: Check the manuals before spending hours writing a blog post :)
No comments:
Post a Comment