EasyManuals Logo

Sharp MZ-800 User Manual

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
Page #73 background imageLoading...
Page #73 background image
LABEL
Format
Explanation
Example
See
also
LABEL
“‘<label
name>”
Abbreviated
Format
LA.
The
LABEL
statement
defines
a
label.
Labels
are
used
to
define
the
destination
to
which
program
execution
will
transfer
from
the
GOTO
or
GOSUB
statement.
Proper
use
of
labels
in
your
program
will
substantially
improve
program
readability.
10
PRINT
‘‘SAMPLE"
20
GOSUB
‘’ABC’’
30
PRINT
“END”
40
END
100
LABEL
“‘ABC’’
110
PRINT
‘‘LABEL
SAMPLE’’
120
RETURN
Line
100
defines
the
label
‘‘ABC”’
as
the
destination
of
the
GOSUB
statement
on
line
20.
After
the
GOSUB
statement
on
line
20
is
executed,
control
is
transferred
to
the
subroutine
starting
at
line
100.
GOTO
GOSUB
GOTO
Format
GOTO/<line
number
>
<label>
Abbreviated
Format
G.
Explanation
Example
The
GOTO
statement
unconditionally
transfers
program
execution
to
the
line
number
specified
in
<line
number>
or
<label>.
If
<line
number>
or
<label>
points
to
a
line
which
contains
executable
statements
(statements
other
than
REM
or
DATA
statements),
execution
resumes
with
that
line;
otherwise,
execution
resumes
with
the
first
executable
statement
following
<line
number>
or
<label>.
10
N=1
20
PRINT
N
30
N=N+1
BOTGCOTO
20
inenes
ewesprmannes
Transfers
program
execution
to
line
20.
50
END
Since
execution
of
the
program
shown
above
will
continue
indefinitely,
stop
it
by
pressing
the
and
keys
together
(this
may
be
done
at
any
time
to
stop
execution
of
a
BASIC
program).
To
resume
execution,
execute
the
CONT
command.
Note:
The
line
number
specified
in
a
GOTO
statement
may
not
be
for
a
line
inside
a
FOR
~
NEXT
loop.
LABEL
GOSUB
6-16

Other manuals for Sharp MZ-800

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Sharp MZ-800 and is the answer not in the manual?

Sharp MZ-800 Specifications

General IconGeneral
BrandSharp
ModelMZ-800
CategoryDesktop
LanguageEnglish

Related product manuals