EasyManua.ls Logo

IBM 5100 - Page 134

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...
130
To
show how the
OFX
function works, we
will
use
the
matrix
created in the pre-
vious example
(see
the
OCR
function).
To
form
matrix
VAR
into
a user-defined
function, the following instruction would
be
entered:
[]FX
VAr~
APL responds
with
the name
of
I
NTG
....
-4--------the
user-defined function.
The
OFX
function produces
an
explicit result (the array
of
characters
that
repre-
sents
the
name
of
the user-defined
function),
and
the original
definition
of
the
user-defined function
(if
there
was
one)
is
replaced.
Now the function I NTG
can
be
displayed
and
executed:
VINTG[[]JV
'V
R~-INTG
A
[tJ
R~··ApO
[2]
I
~<l
I::
::~]
ST('~~~T:
I~[
I
]~-I
[1·1·] lfoI+:1.
[5]
..
~
( I
~;A)
ISTAI~T
V
INTG
5
1
'1
3
'+
c-
..
--
~
INTG
B
1
2
:3
1+
1::-
-.J
6 7
8
Following
is
an
example
that
shows how the OCR
and
OFX functions
can
be
used
to
modify
the definition
of
a
function
within
another function_ This
example will
use
the following user-defined
function:
VINTG[[]]~l
'V
Rf·INTG A
[:I.]
R~-I~pO
[2]
I~t
[3]
START;R[I]~A
[1+]
I~-·I+:I.
[5]
~(I~A)/START
V
INTG
l+
l+
1+
1+

Table of Contents

Other manuals for IBM 5100

Related product manuals