IT. Expert System.

VBS

VarType()


Description

The VarType() function returns a value that indicates the subtype of a specified variable.

The VarType() function can return one of the following values:

Constant Value Description
vbEmpty 0 Empty (uninitialized)
vbNull 1 Null (no valid data)
vbInteger 2 Integer
vbLong 3 Long integer
vbSingle 4 Single-precision floating-point number
vbDouble 5 Double-precision floating-point number
vbCurrency 6 Currency
vbDate 7 Date
vbString 8 String
vbObject 9 Automation object
vbError 10 Error
vbBoolean 11 Boolean
vbVariant 12 Variant (used only with arrays of Variants)
vbDataObject 13 A data-access object
vbByte 17 Byte
vbArray 8192 Array

Note: If the variable is an array VarType() returns 8192 + VarType(array_element). Example: for an array of integer VarType() will return 8192 + 2 = 8194.

This function has the form:

VarType(varname)
Parameter Description
varname (required) A variable name

Examples

The following example shows the basic use of this function:

x="Hello World!"
Msgbox(VarType(x))
x=4
Msgbox(VarType(x))
x=4.675
Msgbox(VarType(x))
x=Null
Msgbox(VarType(x))
x=Empty
Msgbox(VarType(x))
x=True
Msgbox(VarType(x))

This produces the following result (each line in a separate pop-up message box):

8
2
5
1
0
11

Miscellaneous Information

Supported in Version: 1.0


Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 1211 / 158768583. Delta: 0.00315 с