Exit status (The GNU Algol 68 Compiler)

#### 2.4.1 Exit status ¶

Some operating systems have the notion of exit status of a process. In such systems, by default the execution of the particular program results in an exit status of success. It is possible for the program to specify an explicit exit status by using the standard procedure `posix exit`, like:

    begin { ... program code ... }
         if error found;
         then posix exit (1) fi
    end

In POSIX systems the status is an integer, and the system interprets a value other than zero as a run-time error. In other systems the status may be of some other type. To support this, the `posix exit` procedure accepts as an argument an united value that accommodates all the supported systems.

The following example shows a very simple program that prints “Hello world” on the standard output and then returns to the operating system with a success status:

    begin puts ("Hello world'n")
    end