EasyManua.ls Logo

Radio Shack TRS-80 Model 4 - Page 289

Radio Shack TRS-80 Model 4
418 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...
STOP
Sample Program
680
INPUT
"TOTAL
RESISTANCE
(OHMS)"; R
680
INPUT
"TOTAL
REACTANCE
(OHMS)";
}(
700
Z =
SQR«R
*
R)
+
(X
*
710
PRINT
"TOTAL
IMPEDANCE
(OHMS)
IS"
Z
This program computes the total impedance for series circuits.
I STOP
Statement
I
Stops program execution.
When a program encounters a STOP statement, it prints the message
BREAK
IN,
followed by the line number that contains the STOP.
STOP is primarily a debugging tool. During the break
in
execution,
you can examine variables or change their values.
The CONT command resumes execution at the point it was halted.
But if the program itself is altered during the break, CONT cannot be
used.
Sample Program
2260
}(
= RND(10)
2270
STOP
2280
GOTO
2260
A random number between 1
and
10
is assigned to
X,
then program
execution halts at line 2270. You can now examine the value X with
PRINT
X.
Type CONT to start the cycle again.
2-163

Other manuals for Radio Shack TRS-80 Model 4

Related product manuals