VARTYPE Function
Returns the type of variable, as determined at compilation, as a string.
Syntax
VARTYPE(variable)
Syntax elements
variable A string containing the name of the variable whose type is to be returned. If variable does not evaluate to a string it must be enclosed in quotes.
Operation
VARTYPE returns the following string:
type scope {rows {columns}}
where:
typeOne of the following:
V Simple variable or dynamic array.
D Dimensioned array.
U Undefined variable.
scopeThe scope of the variable, as follows:
0 Local.
1 Global common.
>=2 Named common. The value specifies which named common section contains the variable, in order of declaration in the program.
rowsThe number of rows in a dimensioned array.
columnsThe number of columns in a dimensioned array.
type, scope, rows and columns are separated by spaces in the string returned.
See also the descriptions of the VARVAL and VARVALTYPE functions and the VARVALSET statement.
Restrictions
variable need not be a static string, but may instead be resolved at run time via the symbol table. Therefore, if the program is compiled with the BASIC command's S option to suppress the symbol table, the variable cannot be resolved and an UNDEFINED result is always returned.