type returns the type of its argument.
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. |
| “xxx” | xxx is an object type nme. For example type(obj_create()) returns the string “obj”. |
Parameters
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, isstring, isreal, iscomplex, ObjGetClass
id-1571891