Documentation Comments
Use this form to comment on this topic. You can also provide any general observations about the Online Documentation, or request that additional information be added in a future release.
Reality V15.0 ()
VARVALTYPE Function (DataBasic) (m618703+varvaltype_f.htm)
Returns the data type of the current value of a variable.
VARVALTYPE(variable {, row {, column}})
variable A string containing the name of the variable whose data type 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.
VARVALTYPE returns a type character, as follows:
00 Cleared, unassigned variable.
01 Scaled binary number.
02 Short string.
04 File variable.
81 String number.
82 Indirect string.
U Undefined.
A string number is a number that has more digits than can be held in the 48-bit accumulator, excluding the sign bit. In other words, a number greater than 247 (140,737,488,355,328). Remember that the effect of scaling means that, for example, at a default precision of 4, the scaled binary number 123 is actually held as 1230000.
An indirect string is any string above 13 characters; that is, more than can be held in a 16-byte DataBasic descriptor, excluding the flag, delimiter and offset bytes.
See also VARTYPE and VARVAL functions, and the VARVALSET statement.