|
Business Functions Overview
Functions have the following format:
Func(<exp>)
The Func part of the function is referred
to as the function name. The name is followed by opening and
closing round brackets. Inside the round brackets there may be an
optional number of parameters. If there is more than one
parameter, they are divided by commas. Consider this function:
Result :=
Int(13.31)
The first part--INT--is the name of the function.
In this case it stands for Integer and literally means "return the
integer of". The number 13.31 is the parameter. The integer of
13.31 is 13. The number 13 would therefore be assigned to the
variable Result.
The next function accepts two parameters:
Result := Max(10,
20)
The function name--MAX--is short for "return the
maximum of two numbers". The first parameter is 10 and the second
parameter is 20. Note how the parameters "10" and "20" are divided
by a comma. Result would be
assigned the value 20. Of the numbers 10 and 20, 20 is the highest
or maximum.
Along with operators and numeric variables, an
arithmetic expression can contain any function which returns a
numeric value. If a compound statement contains such a function
then this function is evaluated before the rest of the
statement.
____________________________
Related Topics
Business
Functions Listing
|