The mvBASIC intrinsic function ASSIGNED( ) returns 1 (true) if the variable enclosed between the parentheses is currently assigned and 0 (false) if it is not. UNASSIGNED( ) returns 0 if the variable is currently unassigned, and 1 otherwise.
Description
One use of these functions is when an application attempts to open files only once, keeping the file variables in a COMMON block. It is much more effective to modify the OPEN statements in existing programs to say:
IF UNASSIGNED(filevar) THEN OPEN ... TO filevar ... |
rather than change the application to open all files as soon as the user logs on and remove all subsequent OPEN statements from all other existing programs.
See Also