Specifications

179
Calling a user-defined function (
SUB function)
This statement calls a user-defined function specified by functionname. You
may omit
CALL when calling a SUB function.
functionname should be a user-defined function defined by SUB...END SUB
statement.
The number of
realparameters should be equal to that of dummyparame-
ter
s, and the types of the corresponding variables used in those parameters
should be identical.
If you specify a global variable in
realparameter when calling a user-defined
function, the user-defined function cannot update the value of the global variable.
This is because all
realparameters are passed not by address but by value.
(So called "Call-by-value")
Syntax errors:
NOTE
Before any call to a SUB function, you need to place definition of the SUB
function or declaration of the SUB function by using the DECLARE state-
ment in your source program.
Error code and message Meaning
error 3: " missing
No double quote precedes or follows
[drivename:]filename.
error 68: Mismatch
The number of real parameters is not
equal to that of the dummy parameters.
dummyparameter was an integer
variable in defining a function, but
realparameter is a real type in call-
ing the function. (If a dummy parameter
was a real variable in defining a function
and
realparameter is an integer
type in calling, then no error occurs.)
error 71: Syntax error [drivename:]filename is not
enclosed in double quotes.
The function specified by
function-
name
has not been defined.