Numeric variables and values not equal to zero are TRUE.
String variables with contents are TRUE, regardless of how many bytes they contain, and regardless of the values of the bytes. For example, the string variable a$ is TRUE after any of the following:
a$ = "0"
a$ = " "
a$ = "\0"
The last example illustrates that strings can contain null characters, characters with
a value of 0x00. Even a string containing one null character is not empty.
Arrays having any elements are TRUE, regardless of how many dimensions they have, or how many elements in any given dimension. Even an array with only one element is not empty and therefore TRUE. All of the array variables are made TRUE by the following statements:
Numeric variables and values that equal zero are FALSE.
String variables with no contents are called empty strings and are FALSE. Strings start out empty, so until they are assigned values, they are FALSE. Strings become empty and FALSE when empty strings are assigned to them, as in a$ = "" .
Arrays with no elements are called empty arrays and are FALSE. Arrays start out empty, so they are FALSE until dimensioned. Arrays become empty when dimensioned or redimensioned to empty arrays, as in:
' a becomes
REDIM a ' a becomes empty
SWAP a, b[c,] ' a becomes empty if b[c,] is empty
ATTACH a TO b[c,] ' a becomes empty