
RPBASIC-52 PROGRAMMING GUIDE
2-35
END
Syntax: END
Function: Terminates program execution and returns to command mode.
Mode: Run
Use: 65000 END
Cards: All
DESCRIPTION
The EN D instruction terminates Basic program ex ecution. If no END instruction is used at the end of a
program, the last instruction automatically terminates the program. Use END after the body of your program
and prior to any subroutines.
Without an END after the main body of your B asic program and prior to any subroutine program lines,
RPBASIC-52 will attempt to execute any subroutines at the end of your program as if they were a
continuation of the main program. This will generate a C-STAC K error whenever a RE TUR N is
encountered.
RELATED
CONT, STOP, GOSUB, ON-GOSUB
ERROR
CAN'T CONTINUE The CONT instruction cannot follow an END instruction.
EXAMPLE
10 GOSUB 100
20 END
100 PRINT PI
110 RETURN
>run
3.1415926
If you remove line 20, a C-Stack error is returned.
Komentáře k této Příručce