Please enable JavaScript to view this site.

A-Shell Development History

New ASB control statement EXITPROGRAM added with compiler edit 1043.

It causes an exit directly from a function or procedure, regardless of how nested, to a special label $EXITPROGRAM in the main program, or to the END if the $EXITPROGRAM label doesn't exist. Although this is effectively an unstructured GOTO, it handles the stack cleanup and provides an solution to the problem of how percolate the desire for a program exit up from a nested function to the top level.

The EXITPROGRAM token can also be used in a RESUME statement in place of EXITFUNCTION, EXITPROCEDURE, or $EXIT...

RESUME EXITPROGRAM {WITH_ERROR {N}}

RESUME $EXITPROGRAM {WITH_ERROR {N}}   ! (equivalent)