EasyManua.ls Logo

Sharp MZ-800 - Page 181

Sharp MZ-800
221 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...
Branch
statements
GOTO
100
GOTO
200
_Jumps
to
statement
number
200
(=
movement
of
program
execution).
GOSUB~
100
GOSUB
700
Branches
to
statement
number
700
subroutine
(calling
of
subroutine).
RETURN:
9
wiiditsiseecciunnedenics
Ends
subroutine
execution
by
RETURN
statement,
and
returns
to
800
RETURN
statement
following
GOSUB
command
in
the
main
program.
IF
~THEN
10
IF
A>20
Jumps
to
statement
number
200
if
variable
A
is
larger
than
20.
Exe-
THEN
200
cutes
next
statement
if
A
is
20
or
less.
50
IF
B<3
THEN
Substitutes
B+3
for
variable
B
if
variable
B
is
less
than
3.
Executes
B=B+3
next
statement
if
B
is
3
or
greater.
IF~GOTO
100
IF
A>
=B
Jumps
to
statement
number
10
if
variable
A
is
equal
to
or
greater
GOTO
10
than
variable
B.
Executes
next
statement
if
A
is
less
than
B.
IF
~GOSUB
30
IF
A=B*2
Branches
to
statement
number
90
subroutine
if
value
of
variable
A
is
GOSUB
90
equal
to
twice
the
value
of
B.
If
not,
executes
next
statement.
(If
there
is
a
multi-statement
following
a
conditional
statement,
the
ON
statement
is
executed
when
the
condition
is
not
reached,
but
the
IF
statement
moves
the
execution
to
the
next
statement
number
if
the
condition
is
not
reached,
and
the
multi-statement
is
ignored.)
ON~GOTO
50
ONAGOTO
Jumps
to
statement
number
70
if
variable
A
is
1,
to
statement
num-
70,
80,
90
ber
80
if
it
is
2,
and
to
statement
number
90
if
it
is
3.
The
next
state-
ment
is
executed
if
A
is
0
or
4
or
more.
The
INT
function
is
included
in
ON,
so
jumps
to
statement
number
80
if
A
is
2.7,
in
the
same
way
as
2.
ON~GOSUB
900ONAGOSUB
Branches
to
statement
number
700
subroutine
if
variable
A
is
1,
and
700,
800
to
statement
number
800
if
it
is
2.
The
next
statement
is
executed
if
A
is
0
or
3
or
more.
Definition
statements
DIM
10
DIM
A(20)
For
one-dimensional
numerical
array
variable
A(
),
21
array
variables
become
available,
from
A(0)
to
A(20).
20
DIM
B{79,79)
For
two-dimensional
numerical
array
variable
B(
),
6400
array
varia-
bles
become
available,
from
B(0,
0)
to
B(79,79).
30
DIM
C1$(10)
For
one-dimensional
string
array
variable
C1$(
),
11
array
variables
become
available,
from
C1$(0)
to
C1$(10).
40
DIM
K$(7,5)
For
two-dimensional
string
array
variable
K$(
),
48
array
variables
become
available,
from
K$(0,
0)
to
K$(7,
5).
DEF
FN
100
DEF
FNA
(X)
Statement
number
100
defines
X?—X
to
FNA
(X),
statement
number
=X12-X
110
defines
logyoX
+1
to
FNB
(X),
and
statement
number
120
defines
110 DEF
FNB
(X)
logeY
to
FNZ
(Y).
=LOG
(X)+1
120
DEF
FNZ
(Y)
Each
function
is
limited
to
1
variable.
=LN
(Y)
DEF KEY
15
DEF
KEY(1)=
The
DEF
KEY
statement
of
statement
number
15
defines
the
func-
“LIST’’+CHR$
tion
LIST
[CR]
to
function
key
number
1,
and
statement
number
25
(13)
defines
the
function
LOAD:RUN
[CR]
to
function
key
number
2.
25
DEF
KEY(2)=
“LOAD:RUN"
+CHR$(13)

Other manuals for Sharp MZ-800

Related product manuals