Syntax: |
string = VARTYPE(variable)
|
The VARTYPE
function returns the type of the argument
as a character string. If the argument is undefined, VARTYPE
returns the string unknown. For example, if
S
is a scalar, X
is a vector, M
is a matrix,
T
is a string variable, and TA
is a string array variable, then:
input | returned string |
VARTYPE(1.0) |
number |
VARTYPE(S) |
scalar |
VARTYPE(X) |
vector |
VARTYPE(M) |
matrix |
VARTYPE(T) |
string |
VARTYPE(TA) |
string array |
VARTYPE('abc') |
literal string |