Skip to main content

Undefined

Specify the response when ObjectScript attempts to fetch a variable that does not exist.

Synopsis

[Miscellaneous]    Undefined=n

n is either 0, 1, or 2. The default value is 0.

Description

The parameter Undefined specifies the behavior when ObjectScript attempts to fetch the value of a variable that has not been defined. The value of Undefined may be 0, 1, or 2:

  • 0 - Always throw an <UNDEFINED> error. (default)

  • 1 - If the undefined variable has subscripts, return a null string, but if the undefined variable is single-valued, throw an <UNDEFINED> error.

  • 2 - Always return a null string.

Changing This Parameter

On the Compatibility page Management Portal (System Administration > Configuration > Additional Settings > Compatibility), in the Undefined row, click Edit. Select the option you want.

Instead of using the Management Portal, you can change Undefined in the Config.MiscellanousOpens in a new window class (as described in the class reference) or by editing the CPF in a text editor (as described in the Editing the Active CPF section of the “Introduction to the Configuration Parameter File” chapter in this book).

To change this parameter for a single process only (as opposed to instance-wide), use the Undefined()Opens in a new window method of the %SYSTEM.ProcessOpens in a new window class. See the class reference for details.

FeedbackOpens in a new window