Vbs Tutorial: function-typename Function

Source: Internet
Author: User

Typename Function

Returns a string that providesVariantChild type information.

Typename (Varname)

MandatoryVarnameParameter, which can be any variable.

Return Value

TypenameThe function return value is as follows:

Value Description
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 String Value
Boolean Boolean value;TrueOrFalse
Empty Not initialized
Null No valid data
<Object type> Actual object type name
Object General Object
Unknown Unknown Object Type
Nothing Object variables of the object instance have not been referenced
Error Error

Description

The following example usesTypenameVariable information returned by the function:

 
Dim arrayvar (4), mytypenullvar = null'AssignNullValue.Mytype =Typename ("VBScript")'Return"String".Mytype =Typename (4)'Return"Integer".Mytype =Typename (37.50)'Return"Double".Mytype =Typename (Nullvar)'Return"Null".Mytype =Typename (Arrayvar)'Return"Variant ()".

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.