Previous Topic: shellType--Query AutoShell Type (Function)Next Topic: AutoShell Classes


typeName--Get the Type Name of an Expression (Function)

This function retrieves the type name of an arbitrary expression. In particular, for objects it returns the name of the defining class.

The function has the following syntax:

typeName(val)

The function returns a string holding the type name of the passed value. For simple types, it returns one of the following strings:

For objects, it returns the name of the defining class.

val

Defines the expression.

Example

Get the type of some expressions:

? typeName(19)  // number
d = new Date;
? typeName(d)   // Date
a = ["a","b","c"];
? typeName(a)   // Array
? typeName(a[0])// string

See also:

gete--Get Environment Variable (Function)

platform--Query Operating System Type (Function)