113
END DEF Directive
End Definition of Multi-line Function
Format
END DEF
Description
Use the END DEF directive to mark the end of a multi-line function. In Execution
mode, when ProvideX encounters a DEF FN directive for a multi-line function, it
skips forward until it encounters an END DEF directive. (That is, control is
transferred to the line or statement after the end definition.) If you use an END DEF
directive without a preceding DEF FN directive, ProvideX returns an Error #45:
Referenced statement invalid.
See Also
Examples
0010 DEF FNX(A,B)
0020 IF A<0 OR B<0 ESCAPE 40 ! Variables' values must be >=0
0030 RETURN SQR(A^2+B^2) ! Length of hypotenuse
0040 END DEF
0100 PRINT FNX(7,8)
->RUN
10.63