EasyManua.ls Logo

Psion 3a Series - Using Your Own OPL Procedures

Psion 3a Series
288 pages
Print Icon
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...
'Evaluate'
option,
for
working
out
single
calculations.
In
the
Word
Processor,
you
can
type
a
list
of
numbers
to
add
or
subtract,
like
this:
25.76
+10.00
+121.09
-43.71
You
can
sum
this
list
by
highlighting
it
and
selecting
'Evaluate'.
Using
your
own
OPL procedures
If
you
have
an
OPL
module
containing
procedures
which
return
a
number
of
some
kind,
you
can
use
these
modules
in
the
Calculator.
You
can
also
pass
values
from
the
Calculator
to
parameters
in
the
procedures.
To
make
your
module
available
for
use,
select
the
'Load
OPL'
option
from
the
'Special'
menu,
and
enter
the
name
of
the module.
For
example,
there
is
no
operator
for
"modulus"
-
the
remainder
after
a
division
of
whole numbers
(
9
modulo
4
is
1
).
You
might
write
and
translate
an
OPL
module
containing this
procedure:
PROC
mod:(a,b)
RETURN
a-INT(a/b)*b
ENDP
Once
you've
used
the
'Load
OPL'
option
and
given
the
module
name,
you
can,
for
example,
type
mod:
(9,4)
and
get
a
result
of
1.
If
you
need
to
use
more
than
one
module,
the
module
you
specify
with
'Load
OPL'
should
use
the
OPL
LOADM
command
to
load
any
other
modules
itself.
If
an
error
occurs
in
one
of
your
own
procedures,
the
cursor
is
positioned
to
the
start
of
the
calculation
line.
To
"unload"
the
OPL
module
you
have
loaded,
you must
exit
the
Calculator.
'Module
does
not
exist'
If
you
load
an
OPL
module
in
the
Calculator,
it
must
be
available
for
all
future
calculations.
If
you
delete
it,
or
remove
the
SSD
on
which
it
is
stored,
a
'Module
does
not
exist'
message
will
be
shown
on
every
future
calculation.
There
are
two
ways
to
solve
the
problem:
•
Reinsert
or
recreate
the
translated
OPL
module.
•
Exit
then
re-open
the
Calculator.
Passing
parameters
to
OPL
All
parameters
passed
from
the
Calculator
to
procedures
which
it
calls
are
by
default
passed
as
floating-point
numbers.
If
a
procedure
is
declared
as
requiring
a
long
integer
parameter,
use
the
INT
function
on
the
number
you
wish
to
pass
-
for
example,
myproc:
(INT(101500)
)
.
36
3:
The
Calculator

Table of Contents

Related product manuals