The UNASSIGNED function allows a program to determine whether a variable has been assigned a value. It takes the general form:
variable is the name of variable used elsewhere in the program.
The function returns Boolean TRUE if variable has not yet been assigned a value. The function returns Boolean FALSE if variable has already been assigned a value.
An example of use is as:
IF UNASSIGNED(VAR1) THEN VAR1 = "Assigned now!" CRT VAR1 END ELSE CRT"I ALREADY HAVE A VALUE" END
See also: ASSIGNED
Go back to jBASE BASIC.