Quick start manual

Syntactic elements
4-13
Expressions
When @ is applied to a method defined in a class, the method identifier must be
qualified with the class name. For example,
@TMyClass.DoSomething
points to the DoSomething method of TMyClass. For more information about
classes and methods, see Chapter 7, “Classes and objects”.
Note
When using the @ operator, it is not possible to take the address of an interface
method as the address is not known at compile time and cannot be extracted at
runtime.
Operator precedence rules
In complex expressions, rules of precedence determine the order in which operations
are performed.
An operator with higher precedence is evaluated before an operator with lower
precedence, while operators of equal precedence associate to the left. Hence the
expression
X + Y * Z
multiplies Y times Z, then adds X to the result; * is performed first, because is has a
higher precedence than +. But
X - Y + Z
first subtracts Y from X, then adds Z to the result; and + have the same precedence,
so the operation on the left is performed first.
You can use parentheses to override these precedence rules. An expression within
parentheses is evaluated first, then treated as a single operand. For example,
(X + Y) * Z
multiplies Z times the sum of X and Y.
Parentheses are sometimes needed in situations where, at first glance, they seem not
to be. For example, consider the expression
X = Y or X = Z
The intended interpretation of this is obviously
(X = Y) or (X = Z)
Table 4.12 Precedence of operators
Operators Precedence
@, not first (highest)
*, /, div, mod, and, shl, shr, as second
+, , or, xor third
=, <>, <, >, <=, >=, in, is fourth (lowest)