EasyManua.ls Logo

Sharp MZ-800 - Page 75

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...
GOSUB
~
RETURN
Format
GOSUB
{<line
number
>
<label>
RETURN
Abbreviated
Format
Explanation
GOS.
~
RE.
The
GOSUB
statement
transfers
program
control
to
a
subroutine
identified
with
<label>
or
beginning
at
the
line
number
specified
in
<line
number>.
After
the
subroutine
has
been
executed,
control
is
returned
by
the
RETURN
statement
to
the
line
following
the
GOSUB
statement.
A
subroutine
is
a
set
of
statements
that
may
be
used
more
than
once
in
a
program.
One
subroutine
may
call
another
subroutine
which
may
call
still
another
subrou-
tine.
Nesting
of
such
subroutines
is
limited
only
by
the
available
memory
space.
Each
called
subroutine
must
have
a
RETURN
statement
at
the
end.
10
INPUT
A,
B
20
GOSUB
100
30
B=C
¥
40
GOSUB
100
10
60
Main
program
50
PRINT
C
60
END
100
C=AT2+B
110
RETURN
}
100
110
Subroutine
6-18

Other manuals for Sharp MZ-800

Related product manuals