Defined()

Tests whether a variable has a defined value (not undefined).

DEFINED var=Any Returns $TRUE if var was defined

example:

	# Check for arithmetic undefined values
	>> x = 5.5 / 0.0
	>> printn Defined(x)
	$FALSE

Note: Useful for testing the presence or absence of procedure parameters.

Defined

Tests an Open GENIE variable to see if its value is undefined. This may happen either as the result of an arithmetic expression which returns an undefined value or because a value has not yet been given to a variable. The results of procedures that terminate with an error are also generally set to undefined.

One of the major uses of this test is to check whether procedure parameters have been supplied by the user. Any parameters which have not been supplied will take an undefined value and can be checked and maybe supplied with a default value if required.

Parameters:

Var (Any)

Variable to test for being defined.

RESULT = (Boolean)

Returns $TRUE if the variable has a defined value.