EasyManua.ls Logo

IBM 5100 - Page 148

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...
144
INTERACTIVE FUNCTIONS
User-defined
functions
can
display messages
and/or
request
input
from
the
key-
board. The messages (character
data)
in
the
user-defined
function
are enclosed in
quotes.
The 0 (quad)
and
[!]
(quad
quote)
symbols are used
to
request
input
from
the
keyboard
during
function
execution.
The
following
function
is
an example
of
an interactive
function
that
computes
the
amount
of
interest
on
a capital
amount
for
a given
number
of
years:
V
C1
[1J
'ENTER
THE
CAPITAL
AMOUNT
IN
DOLLARS'
[2]
A~"[]
[3]
'ENTER
THE
INTEREST
IN
PERCENT'
[1+:1
I~-IJ
[S]
'ENTER
THE
PERIOD
IN
YEARS'
£:
6::1
Y~"J]
[7J
'THE
RESULT
IS'
[8]
AX(1+0,01xI>*YV
CI
ENTER
THE
CAPITAL
AMOUNT
IN
DOLLARS
[]:
:1.00
ENTER
THE
INTEREST
IN
PERCENT
1]:
B
ENTER
THE
PERIOD
IN
YEARS
[]:
THE
I~ESUI...T
IS
:f.:l.6,6'+
CI
ENTER
THE
CAPITAL
AMOUNT
IN
DOLLARS
[]:
:1.000
ENTER
THE
INTEREST
IN
PERCENT
[]:
8,8B
ENTER
THE
PERIOD
IN
YEARS
[]
:
~
..
~j
THE
RESULT
IS
1.
::j:~(}
,2

Table of Contents

Other manuals for IBM 5100

Related product manuals