AT&T 6300 Programmer's Manual page 228

Gwbasic by microsoft
Hide thumbs Also See for 6300:
Table of Contents

Advertisement

DEFFN
Statement
The variables in the argument list represent, on
a one-to-one basis, the argument variables or
values that are to be given in the function call.
User-defined functions may be numeric or
string. The type of the function is specified by
"name." The type of the expression must match
the type of the function, otherwise a "Type
Mismatch" occurs. If the function is numeric
the
value of the expression is forced to that type
before the function value is returned.
If
a DEF FN statement has not been executed
before the function it defines is called, an
"Undefined user function" error occurs.
Example
400
410
420
R=1:S=2
DEF FNAB(X,Y) = X
~
3/Y
~
2
T
=
FNAB(R,S)
7-72
Line 410 defines the function FNAB. The
function T will contain the value
(R"
3)
divided by (S
~
2) or .25.

Advertisement

Table of Contents
loading

Table of Contents