1.1 The Application Module

The Application module provides procedures for accessing the application's arguments, and for terminating applications.

getCgiArgs

{Application.getCgiArgs +Spec ?R}

acquires the arguments (both GET and POST methods supported) and parses them according to Spec as described in Section 1.3. Returns the options in R.

getCmdArgs

{Application.getCmdArgs +Spec ?R}

acquires the arguments from the system property 'application.args' and parses them according to Spec as described in Section 1.3. Returns the options in R.

getGuiArgs

{Application.getGuiArgs +Spec ?R}

pops up a graphical interface with which the user can interactively and comfortably edit the possible options described by Spec as described in Section 1.3. Returns the options in R.

getArgs

{Application.getArgs +Spec ?R}

This is the recommended way of acquiring an application's arguments. It invokes either Application.getCmdArgs or Application.getGuiArgs depending on the value of boolean property 'application.gui'. The latter is set to true when the ozengine is invoked with option --gui.

processArgv

{Application.processArgv +Spec ?Ss}

performs argument parsing on the explicitly given list of strings Ss according to specification Spec.

processCgiString

{Application.processCgiString +Spec ?S}

performs argument parsing on the explicitly given CGI query string S according to specification Spec.

Error Handling

If an error is encountered in the input, an error exception of the form ap(usage VS) is raised. VS describes the error in textual form.

exit

{Application.exit +I}

terminates the application with return status I, 0 indicating success and non-0 indicating failure of some kind.


Denys Duchier, Leif Kornstaedt, Martin Homik, Tobias Müller, Christian Schulte and Peter Van Roy
Version 1.4.0 (20080702)