.. highlightlang:: us .. index:: type .. _type: type ==== .. us.tag type ENGLISH Programming.Datatype Changed410 :ref:`type` returns the type of its argument. .. function:: ssType = type(var) .. us.return **Return Value** *ssType* is a scalar string and can have one of the following values: .. list-table:: :header-rows: 1 * - 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 :ref:`error_create`. * - "xxx" - xxx is an object type name. For example ``type(obj_create())`` returns the string "obj". .. us.params **Parameters** .. uparam:: var *var* is a name of a matrix or a function. .. us.example **Example** The following example prints the string ``"complex"``: :: * a = 1 + 2i * type(a); complex .. seealso:: :ref:`overview-programming`, :ref:`isfunctionloaded`, :ref:`isstring`, :ref:`isreal`, :ref:`iscomplex`, :ref:`ObjGetClass` :sub:`id-1571891`