X + (Y * Z)
Here the parentheses are unnecessary (to the compiler), but they spare both programmer and reader from having
to think about operator precedence.
Function Calls
Because
functions return a value, function calls are expressions. For example, if you've defined a function called
Calc
that takes two integer arguments and returns an integer,
then the function call
Calc(24,47)
is an integer
expression. If
I
and
J
are integer variables, then
I + Calc(J,8)
is also an integer expression. Examples of
function
calls include
Sum(A, 63)
Maximum(147, J)
Sin(X + Y)
Eof(F)
Volume(Radius, Height)
GetValue
TSomeObject.SomeMethod(I,J);
For more information about functions, see Procedures and functions.
Dostları ilə paylaş: