English
Language : 

NSB8 Datasheet, PDF (46/158 Pages) List of Unclassifed Manufacturers – BASIC interpreter for Z80 family
grifo®
FNEND
ITALIAN TECHNOLOGY
STATEMENT:
FNEND
ACTION:
FNEND marks the end of the segment of program text which constitutes a multiple line user function
definition.
EXAMPLE FUNCTION:
10 DEF FNF (X) \ REM Compute factorial
15 X=INT(ABS(X)) \ REM Eliminate bad arguments
20 IF X=0 OR X=1 THEN RETURN 1 ELSE RETURN FNF (X-1) *X
30 FNEND
REMARKS:
The FNEND statement should not be confused with the RETURN statement used to end multi line
user function execution.
The FNEND statement may not appear on the same program line as a DEF statement.
ERROR MESSAGES:
CONTROL STACK ERROR
The FNEND statement is not supposed to be executed. This error results when an FNEND statement
is executed.
FUNCTION DEF ERROR
The FNEND statement is on the same line as a DEF statement, or an FNEND statement exists which
cannot be matched with a corresponding DEF statement.
SEE ALSO:
Section USER FUNCTIONS
Statement DEF
Statement RETURN
Page 34
NSB8
Rel. 5.10