EasyManua.ls Logo

IBM 5100 - Page 139

IBM 5100
228 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
Loading...
(
I"~
~"
3.
Enter another
\j
when the
function
definition
is
complete. The closing
\j
may
be
entered alone
or
at the
end
of
a statement. For example:
[~J
+/VISITORV
or
[5]
V
Note:
If
the closing
\j
is
entered at the
end
of
a comment statement, which
begins
with
a A symbol, the
\j
will
be
treated
as
part
of
the comment and
the function
will
not
be
closed.
Function Header
The function header
names
the
function
and
specifies whether a
function
has
no
arguments (niladic), one argument (monadic),
or
two
arguments (dyadic).
Note: Function
names
should
not
begin
with
S~
or
T~,
because
S~
and T
~
are
used
for
stOp
and trace control (Stop Control
and
Trace
Control
are
discussed
later in this chapter).
The function header
also
determines whether
or
not a function
has
an
explicit
result.
If
a
function
has
an
explicit
result, the result
of
the function
is
tempor-
arily stored in a result- variable
(names
in the function header)
for
use
in calcula-
tions outside the function. The result variable must
be
included in the result
statement (the statement that determines the final result
of
the
function)
as
well
as
the function header. For example:
"J
RESULT~
[1]
RESULT~X+YV
3PLUf~
Result Variable
"1
~
The result
of
the
function
is
17
1.
0+~5
PLUS
LI·~
temporarily stored in the
re-
sult variable
so
that
it
can
be
used
by another function.
User-defined functions that do
not
have
an
expl icit result cannot
be
used
as
part
of
another expression. For example:
v X
PI...US:t.
Y
[1]
X+YV
7
:1.0,+:3
PLUS 1
l~
VALUE
E
I~
RO
I~
10+:3
PLUSl
1+
135

Table of Contents

Other manuals for IBM 5100

Related product manuals