
162
Calling a user
Calling a userCalling a user
Calling a user-
--
-defined function
defined functiondefined function
defined function (SUB function)
(SUB function) (SUB 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 dummyparameters, 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")
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 statement in
your source program.
Syntax errors:
Syntax errors:Syntax errors:
Syntax errors:
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 calling 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 functionname has
not been defined.
Comentários a estes Manuais