beautypg.com

Rpbasic-52 programming guide – Remote Processing BASIC 52 User Manual

Page 54

background image

RPBASIC-52 PROGRAMMING GUIDE

2-35

END

Syntax:

E N D

Function:

Terminates program execution and returns to command mode.

Mode:

Run

Use:

6 5 0 00 E N D

Cards:

All

D E S C R IP T I ON

The EN D instruction term inates Basic program ex ecution. If no EN D instruction is use d 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 EN D 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 progra m. This w ill generate a C -STAC K error whe never a RE TUR N is
encountered.

RELATED

C O N T , S TO P , G O SU B , O N -G O S U B

E R R O R

C A N ' T C O N T IN U E The CON T 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.