VARVALSET Statement
Changes the value stored by a variable.
Syntax
VARVALSET variable {, row {, column}} TO expression [THEN statement(s) | ELSE statement(s)]
Syntax elements
variable A string containing the name of the variable whose value is to be changed. 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.
expression An expression that evaluates to a numeric or string value.
Operation
The variable will not be updated if it does not exist, or if it is not otherwise legal to update.
The ELSE clause is taken if the variable cannot be updated for any reason
See also the VARTYPE, VARVAL and VARVALTYPE functions.
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.