VARVAL Function

Returns the current value of a variable.

Syntax

VARVAL(variable {, row {, column}})

Syntax elements

variable A string containing the name of the variable whose value is to be returned. If variable does not evaluate to a string it must be enclosed in quotes.

row If variable is a dimensioned array, the row number of the required element; if row is not specified, 1 is assumed. This parameter is ignored if the variable is not a vector or a matrix.

column If variable is a dimensioned array, the column number of the required element; if column is not specified, 1 is assumed. This parameter is ignored if the variable is not a matrix.

Operation

The value of an unassigned common variable is indicated by the string "<unassigned>".

The value of a file variable is indicated by the string "<file variable> fileName"

See also the VARTYPE 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.