in BASIC ROM:
|List of all BASIC keywords|
Type: Numeric function General Programming-Syntax: FN <function name>(numeric argument)
The BASIC-command FN executes a function which has been defined previously in the course of the program with the BASIC-command DEF. After the definition the function can also be executed by the command PRINT FN Y(X). The space between FN and the name of the function can be omitted.
If the definition via DEF is missing or not executed before the use of FN, the interpreter will report an "?UNDEF'D FUNCTION ERROR". If the numeric argument X is missing, the interpreter will answer "?SYNTAX ERROR". An "?OUT OF MEMORY ERROR" can also occur if the function has been defined recursively. It is possible to use different functions within one operation as in the final example given below.
PRINT FN TEST(3) (direct execution after previous definition via DEF !!) PRINT FN LO10(A) PRINT FN X(9.873)
10 A = FN DATEN1 (X) - FN JAHR2(Y) 20 H=H+1: IF FN TE3 (H+1) = 6 THEN 20 (execution within a program) 30 A=FN X(FN Y(Z))