basic.assigned Function/BASIC Program

basic.assigned

Command basic.assigned Function/BASIC Program
Applicable release versions: AP
Category BASIC Program (486)
Description determines if the variable has been assigned a value.

If the variable has an assigned value, a non-zero value (true) is returned. If no value was ever assigned, 0 (false) is returned.

"assigned" can tell if common variables have been previously assigned.

"assigned" works well in Pick/BASIC subroutines called from the "call" Access processing code. It prevents files from being repeatedly opened and variables from continually being re-initialized.
Syntax assigned(variable)
Options
Example
if not(assigned(fv.entity)) then file entity

This determines if the file.variable "fv.entity" has been assigned 
previously with the "file" statement. If it has not been assigned, 
the "file" statement is executed.
Purpose
Related basic.clear
basic.assignment
basic.statements
basic.=
basic.common