3초기억력

ASP - VBScript VarType Function 본문

플밍_ASP

ASP - VBScript VarType Function

잠수콩 2011. 4. 15. 14:18


제목 : VBScript VarType Function


<script type="text/vbscript">

x="Hello World!"
document.write(VarType(x) & "<br />")
x=4
document.write(VarType(x) & "<br />")
x=4.675
document.write(VarType(x) & "<br />")
x=Null
document.write(VarType(x) & "<br />")
x=Empty
document.write(VarType(x) & "<br />")
x=True
document.write(VarType(x))

</script>


8
2
5
1
0
11



내용 :

The VarType function returns a value that indicates the subtype of a specified variable.
(해석 : VarType 함수는 지정된 변수의 종류를을 나타내는 . )

The VarType function can return one of the following values:
(해석 : VarType 함수 다음 값 중 하나를 반환할 수 있습니다 : )

  • 0 = vbEmpty - Indicates Empty (uninitialized)
  • 1 = vbNull - Indicates Null (no valid data)
  • 2 = vbInteger - Indicates an integer
  • 3 = vbLong - Indicates a long integer
  • 4 = vbSingle - Indicates a single-precision floating-point number
  • 5 = vbDouble - Indicates a double-precision floating-point number
  • 6 = vbCurrency - Indicates a currency
  • 7 = vbDate - Indicates a date
  • 8 = vbString - Indicates a string
  • 9 = vbObject - Indicates an automation object
  • 10 = vbError - Indicates an error
  • 11 = vbBoolean - Indicates a boolean
  • 12 = vbVariant - Indicates a variant (used only with arrays of Variants)
  • 13 = vbDataObject - Indicates a data-access object
  • 17 = vbByte - Indicates a byte
  • 8192 = vbArray - Indicates an 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.




Comments