DataBasic Reference > Statements and Intrinsic Functions > V > VARTYPE Function

Comment on this topic

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 ()

VARTYPE Function (DataBasic) (m618703+vartype_f.htm)

To

Reality

Version

Topic

Submitted by

Company

Location

Email address

Comment

 

 

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.

RealityV15.0Comment on this topic