EasyManuals Logo

IBM 5100 Basic Reference Manual

IBM 5100
187 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #68 background imageLoading...
Page #68 background image
DEF
FNfunction-name
[(arith-var [,arith-varl
..
.lJ
[=arith-exp]
64
FNEND
[comment]
RETURN
[arith-exp]
OEF,
FNENO,
RETURN
The DEF statement
is
not executable.
but
informational. This
statement
allows the
user
to
define an arithmetic function for use later
in
the program. The FNEND state·
ment indicates
the
end
of
the function. and
the
RETURN statement specifies
the
value
of
the function. The syntax
of
the
DE!=
statement can be either a single line
or
multiline function. (The syntax
of
the FNEND and RETURN statements are
shown after
the
DEF statement syntax.)
Single Line Function
DEF
FNfunction-name
[(arith-var [,arith-var]
...
] [=arith-exp]
where:
function-name
is
any character
of
the
extended BASIC alphabet. This character
with
FN
is
the
name
of
the defined function.
(arith-var)
is
one or more simple arithmetic variables
to
which a value will be assigned
when
the
function
is
called (these must be enclosed
in
parentheses).
arith-exp
is
an arithmetic expression
that
can
be
invoked by reference
in
another
statement during program execution. A sample single line function DEF state·
ment
is
as
shown:
120 DEF FNA(R)=2*R+100
Multiline Function
DE
F FNfunction-name [(arith.var [,arith·varl
...
) ] [=arith·exp]
where:
function-name
is
any character
of
the extended BASIC alphabet. This character
with
FN
is
the name
of
the
function.
(arith-var)
is
one or more simple arithmetic variables
that
receive a value when the
function
is
referenced. These optional variables must be enclosed
in
parentheses.
/

Table of Contents

Other manuals for IBM 5100

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the IBM 5100 and is the answer not in the manual?

IBM 5100 Specifications

General IconGeneral
Release Year1975
RAM16 KB - 64 KB
Storage204 KB tape drive
Display5-inch CRT
Operating SystemAPL/BASIC
ProcessorIBM PALM (1.9 MHz)

Related product manuals