
Chapter 14. Statement Reference
199
• 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 FUNCTION...END FUNCTION, you need to place
def-inition of the FUNCTION function or declaration of the FUNCTION by
the DECLARE statement in your source program.
Syntax errors:
Syntax errors:Syntax errors:
Syntax errors:
When programming a user-defined function
Error code and message Meaning
error 64: Function redefinition
You made double definition to a same
function name.
error 71: Syntax error
• funcname is an integer function
name, but generalexpression is a
real type.
(If funcname is a real function name
and generalexpression is an
integer type, then no error occurs.)
• stringlength is out of the range.
• stringlength is not an integer
constant.
• The function name is assigned a
value outside the function definition
block.
error 95: Incorrect use of
FUNCTION, EXIT FUNC-TION,
or END FUNCTION
• The EXIT FUNCTION statement is
specified outside the function
definition block.
• The END FUNCTION statement is
specified outside the function
definition block.
error 96: Incomplete control
structure(FUNC-TION...END
FUNCTION)
END FUNCTION is missing.
error 97: Cannot use FUNCTION in
control structure
The FUNCTION…END FUNCTION
statement is defined in other
blockstructured statements such as FOR
and IF statement blocks.
Comentarios a estos manuales