EasyManua.ls Logo

Radio Shack TRS-80 Model III - Page 162

Radio Shack TRS-80 Model III
274 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...
h;
.
{
TRS-80 MODEL III
STOP
Interrupts
execution and prints a BREAK
IN line number message
.
STOP
is primarily
a
debugging aid. During the break
in execution, you can examine or change
variable values. The
command CONT
can then be used
to
re-start execution at the
point where it left off. (If the program
itself is altered
during
a
break, CONT cannot
be
used.)
Example:
10 X
=
RND
< 1 )
20 SIrop
30
G(!»SUB
1000
99
END
1000
REM
1010
RETURN
Suppose we
want to examine what value for X
is being passed to the
subroutine
beginning at line 1000. During
the break, we can
examine
X
with
PRINT
X.
GOTO line number
Transfers program control to
the
specified line number. Used alone, GOTO line
number results in
an unconditional (or automatic) branch; however,
test statements
may precede the GOTO to effect a
conditional branch
.
Example:
200 GOT0
10
When
200 is executed,
control will automatically
jump
back to line 10.
You
can
use GOTO
in
the Immediate Mode as
an alternative to RUN
. GOTO line
number
causes
execution to begin at the specified
line
number, without an
automatic CLEAR. This lets you pass values
assigned in
the
Immediate
Mode to
variables in the Execute Mode.
See IF,THEN,ELSE,ON... GOTO.
152

Other manuals for Radio Shack TRS-80 Model III

Related product manuals