EasyManua.ls Logo

Sharp MZ-800 - Page 52

Sharp MZ-800
221 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...
LOG(X)
Common
logarithm
Returns
the
common
logarithm
of
X
(logioX),
where
X
must
be
greater
than
0,
Example:
A=LOG(X)
LN(X)
Natural
logarithm
Returns
the
natural
logarithm
of
X
(logeX),
where
X
must
be
greater
than
0.
Example:
A
=LN(X)
PAI(X)
Circular
constant
Returns
the
value
which
is
X
times
pi.
(PAI(1)
=
4
=3.1415927)
Example:
A=PAI(X)
or
A=47*X
RAD(X)
Radian
Converts
the
numeric
value
X
from
degrees
into
a
value
in
radians.
Example:
A=
RAD(X)
(2)
Character
functions
A
character
function
processes
character
strings.
The
MZ-800
BASIC
supports
the
following
charac-
ter
functions.
In
the
examples
below,
character
variable
A$
contains
the
character
string
““ABCDEFG”’.
LEFTS(x$,n)
x$:
character
string
n:
numeric
value
(from
0
to
255)
Returns
a
string
consisting
of
the
left
n
characters
of
string
XS.
Example:
B$
=
LEFT$(A$,2)
produces
string
‘‘AB’”
MIDS$(x$,m,n)
x$:
character
string
m:
numeric
value
from
1
to
255
n:
numeric
value
from
0
to
255
Returns
a
string
consisting
of
n
characters
following
the
mth
character
from
the
beginning
of
string
xS.
Example:
B$
=
MIDS$(A$,3,3)
produces
string
‘“CDE”’.
RIGHTS(x$,n)
x$:
character
string
n:
numeric
value
(from
0
to
255)
Returns
a
string
consisting
of
the
right
n
characters
of
string
x$.
Example:
B$
=
RIGHT$(AS,2)
returns
a
string
consisting
of
the
right
2
characters
of
string
A$.
There-
fore,
variable
B$
is
returned
as
the
string
‘‘FG’’,
Functions
used
with
the
PRINT
statement
TAB(n)
n:
numeric
value
Moves
the
cursor
to
the
(n+
1)th
character
position
from
the
left
end
of
the
current
line.
This
function
is
ignored
when
n
is
less
than
the
current
cursor
location.
Example:
PRINT
‘‘A’’;TAB(3);“*ABC”
A
ABC
012345
+
column
positions
which
are
not
displayed.
t
String
‘ABC’
is
displayed
from
column
3.
5-11

Other manuals for Sharp MZ-800

Related product manuals