DEFINES THE FUNCTION F
ACTION
The command FNC F begins the function called F.
A function is a group of statements which can be called in an expression and which returns a value by the command RESULT.
The functions are typed like the variables:
- if the name of a function ends by %, it returns an integer
- if the name of a function ends by $, it returns a string
- if the name of a function ends by a letter or a number, it returns a real
SYNTAX:
FNC F(P1, P2 ,…)
USE ERROR EXAMPLE
dim i%
for i%=1 to 10
print double(i%)
next i%
end
fnc double(j%)
result 2*j%
end_fnc
FNC
FNC F
SEE ALSO
RESULT
END_FNC
EXIT_FNC