티스토리 뷰

[출처] http://www.devguru.com/technologies/vbscript/quickref/vartype.html

VarType(Varname)

CONSTANT VALUE DESCRIPTION
VBEmpty 0 Uninitialized
VBNull 1 Contains no valid data
VBInteger 2 Integer subtype
VBLong 3 Long subtype
VBSingle 4 Single subtype
VBDouble 5 Double subtype
VBCurrency 6 Currency subtype
VBDate 7 Date subtype
VBString 8 String subtype
VBObject 9 Object
VBError 10 Error subtype
VBBoolean 11 Boolean subtype
VBVariant 12 Variant (only use for arrays of variants)
VBDataObject 13 Data access object
VBDecimal 14 Decimal subtype
VBByte 17 Byte subtype
VBArray 8192 Array

Code:
<% whatsubtype="This is a string subtype" %>
<% =VarType(whatsubtype) %>

 
Output:
8
 
Code:
<% whatsubtype=12345 %>
<% =VarType(whatsubtype) %>

 
Output:
2

댓글