next up previous contents index
Next: local ``Statement'' Up: Statements Previous: fail Statement

exit Statement

 

  As discussed in § 11.1.2, page gif, normally a Glish program ends when the last statement of the main program has been executed and all tasks have terminated. To prematurely end the program, use exit, which has a syntax similar to that of return:

exit

exit expression

The first exits the program with a status of 0; the second evaluates expression and converts it to an integer scalar (by ignoring all but the first element), which is then used as the exit status.



Thu Nov 13 16:44:05 EST 1997