|
| Previous: 2.13 Meta Commands | TOC | Index | Back | Next: 3. The Runtime Environment |
Each program has an initial entry point where the execution begins at run time. In T3X, the entry point is formed by a compound statement at the global level. This compound statement is mandatory and it must always be the last definition of the entire program. Consequently, the minimum valid T3X program is
DO END
The main procedure, like any other compound statement, may declare its own local symbols. Since it has no name, it cannot recurse, though. RETURN may not be used in it, because there is no procedure to return to.
When executation reaches the end of the main procedure, the program terminates and delivers a zero return code back to the calling process. To deliver a distinct return value, HALT may be used.
| Previous: 2.13 Meta Commands | TOC | Index | Back | Next: 3. The Runtime Environment |