STOP¶
Syntax¶
Purpose¶
To terminate program execution and return to the BASIC prompt.
Remarks¶
STOP statements may be used anywhere in a program to terminate execution. When a STOP is encountered, the following message is printed: "Break in line nnnnn".
Unlike the END statement, the STOP statement does not close files. BASIC-80 always returns to the BASIC prompt after a STOP is executed. Execution is resumed by issuing a CONT command.
Example¶
Output:
This example shows how STOP interrupts execution, allows inspection of variables, and resumes with CONT.
See Also¶
- CONT - Continue program execution after STOP
- END - Terminate program execution and close all files, returning to the BASIC prompt
- CHAIN - Call another program and pass variables
- CLEAR - Reset variables and optionally set memory limits
- RUN - Execute the current program
- SYSTEM - Exit MBASIC and return to the operating system