type¶
type returns the type of its argument.
-
ssType = type(var)
Return Value
ssType is a scalar string and can have one of the following values:
Value | Meaning |
---|---|
“real” | var is a real matrix. |
“complex” | var is a complex matrix. |
“string” | var is a string matrix. |
“object” | var is a COM object pointer. |
“obj” | var is a object matrix. |
“variant” | var is a variant matrix. |
“function” | var is a function. |
“undef” | var is not defined. |
“error” | var is an error object. See error_create. |
“xxx” | xxx is an object type name. For example type(obj_create()) returns
the string “obj”. |
Parameters
-
var
var is a name of a matrix or a function.
Example
The following example prints the string "complex"
:
* a = 1 + 2i
* type(a);
complex
See also
Overview Programming, IsFunctionLoaded, isstring, isreal, iscomplex, ObjGetClass
id-1571891