VBScript » Functions » TypeName

Syntax:
TypeName(varname)

The TypeName function returns the name of the datatype of the variable passed to varname.

The function returns one of the following values:

  • Byte - Byte value
  • Integer - Integer value
  • Long - Long integer value
  • Single - Single-precision floating-point value
  • Double - Double-precision floating-point value
  • Currency - Currency value
  • Decimal - Decimal value
  • Date - Date or time value
  • String - Character string value
  • Boolean - Boolean value; True or False
  • Empty - Uninitialized
  • Null - No valid data
  • - Actual type name of an object
  • Object - Generic object
  • Unknown - Unknown object type
  • Nothing - Object variable that doesn't yet refer to an object instance
  • Error - Error

    Examples

    Code:
    <% =TypeName("ABC") %>
    <% =TypeName(5)%>
    <% =TypeName(15.50) %>
    Output:
    String
    Integer
    Double
    Language(s): VBScript