Terminating the current programΒΆ
exit |
Terminate the current program |
SYNTAX
exit [numeric_expression]
Terminates the current program immediately and returns control to the parent task.
numeric_expression |
May be used to pass back a numeric exit code from the program. The default exit code is 0. |
The exit code of a child process called from a Sculptor program is assigned to the system variable sys.Status.
If the exit command appears in a !report section, it terminates the program without executing any further statements, including the !final section. The Reset Printer sequence (Section 3, sequence 6) from the printer parameter file is issued. Unless the screen form logic has been by-passed, the terminal is also reset as described above. The program then terminates immediately. Note that not only the report but also the screen form program is terminated. To end a !report section and return to the screen form, use the end report command.
NOTES
The abort command, which is functionally identical to exit, should be regarded as obsolescent.
In versions of Sculptor earlier than V.3 the exit command, when used in a report, executed the !final section before terminating the program. If necessary, and for purposes of backward compatibility only, !compat exit = 2 can be declared in a program to retain the old behaviour.
EXAMPLE
exit 3
exit tmp.ExitStat
RELATED TOPICS |