Sharp MZ-700 Series Owner's Manual page 61

Personal computer
Hide thumbs Also See for MZ-700 Series:
Table of Contents

Advertisement

2 . 3 . 8 . 2 STOP
(abbreviated format: S.)
Format
Function
Example
Note
STOP
Temporarily stops program execution, displays BREAK and READY, then waits for
entry of executable commands in the direct mode.
The STOP statement is used to temporarily interrupt program execution, and
may be inserted at as many points and locations in the program as required. Since
execution of the program is only interrupted temporarily, the PRINT statement can
be used in the direct mode to check the values stored in variables, after which
execution can be resumed by entering CONT J .
1 0
20
30
40
5 0
6 0
7 0
R U N
B R E A K
I N
R E A D
A . B
X = A X B
S T O P
Y = A / B
P R I N T
X , Y
D A T A
1 5 .
5
E N D
3 0
2. 3. 8. 3 END
Note
Unlike the END statement, no files are closed by the STOP statement. (See page 68
concerning procedures for opening and closing of files.)
(abbreviated format: E.)
END
The END statement terminates program execution and returns the BASIC inter-
preter to the command mode for input of direct mode commands. When this state-
ment is executed, READY is displayed to indicate that the BASIC interpreter is
ready. After the END statement has been executed, execution cannot be resumed by
executing the CONT command even if there are executable statements on program
lines following the END statement.
All open files are closed when the END statement is executed. (See page 68 concern-
ing procedures for opening and closing files.)
Differences between the STOP and END statements
Screen display
Files
Resumption of execution
S T O P
B R E A K
I N
x x x x
R E A D Y
Open files are
not closed.
Can be resumed by
executing CONT.
E N D
R E A D Y
Open files are
closed
Cannot be resumed.
2. 3. 8. 4 CLR
CLR
The CLR command clears all variables and cancels all array definitions. All numeric
variables are cleared to 0, and null strings (" ") are placed in all string variables;
arrays are eliminated entirely by nullifying all previously executed DIM statements.
Therefore, DIM statements must be executed to redefine the dimensions of required
arrays before they can be used again.
59

Advertisement

Table of Contents
loading

Table of Contents