HP 3000 Manuals

STOP [ HP Business BASIC/XL Reference Manual ] MPE/iX 5.0 Documentation


HP Business BASIC/XL Reference Manual

STOP 

The STOP statement terminates program execution.

Syntax 

STOP

The STOP statement can be in a main program or a subunit.  A program can
contain more than one STOP statement.

Examples 

     100 READ I
     110 ON I GOSUB 200,300,400
     120 STOP                     !After return from the above ON GOSUB, the program
     130                          !stops.
     200 I=I+1
     210 RETURN
     300 I=I+I
     310 RETURN
     400 I=I*I
     410 RETURN
     999 END

The STOP, END, or SCRATCH statement can stop a program.  When a program
stops, the following occurs:

 *  Subroutine return pointers are lost.

 *  FOR NEXT loop "bookkeeping" is lost.

 *  Subunit call "bookkeeping" is lost.

 *  Files are closed (except those declared in COMMON).

 *  Data pointers are lost.

 *  ON END, ON ERROR, ON DBERROR, ON GOTO, and ON GOSUB statements are
    deactivated.



MPE/iX 5.0 Documentation