UNASSIGNED Function

Determines whether or not a value is assigned to a variable.

Syntax

UNASSIGNED(variable)

Syntax Elements

variable is a single variable reference only.

Comments

UNASSIGNED returns 0 (zero) if variable is currently assigned a value; otherwise, it returns 1.

See Also

ASSIGNED function (MultiValue compatibility).

Examples

X = UNASSIGNED(VAR)

Variable X is assigned a value of 0 if VAR is currently assigned a value, or a value of 1 otherwise.

IF UNASSIGNED(INDEX) THEN GO 10 ELSE GO 20

The program branches to statement label 20 if INDEX is currently assigned a value. The program branches to statement label 10 if INDEX is currently unassigned.