Getting Started | Documentation | Glish | Learn More | Programming | Contact Us |
![]() | Version 1.9 Build 1556 |
|
Normally a Glish program ends when the last statement of the main
program has been executed and all tasks have terminated, as discussed
in § 13.1.2, page . To prematurely
end the program, you use exit.
As you can see, it has a syntax similar to that
of return:
exit
exit expressionThe first statement exits the program with a status of 0. The second statement evaluates expression and converts it to an integer scalar (by ignoring all but the first element), which is then used as the exit status.