How do I get the type of a variable using VBScript?
相关问题
- If condition not working in classic ASP
- How to programmatically convert Access 1997 .mdb t
- IE8 Form Not Submitting (Intermittent)
- Server.Transfer from ASP to ASP.Net
- VBScript / ADODB Syntax Issue with adArray?
相关文章
- Can a VBScript function return a dictionary?
- UTC Time Assignment in VBScript
- Copy and Rename File VBScript
- How do I open a file with VBScript?
- ZURB Foundation, switching tab programmatically
- Import WinAPI Function in *.VBS File
- How to reference the mail which triggered the outl
- Accessing COM Component from Classic ASP which con
This version invests more effort setting up the dictionary, but then looks up any type in one check(fingers crossed) rather than checking every single type every single time.
equivalent JScript code(hypothetical, since JScript has typeof, and lacks many vb types):
vartype is appropriate ...
Tmdean's answer also works to get the Type Name (not an integer) of (almost) all other types of variables (per http://msdn.microsoft.com/en-us/library/ie/y58s1cs6%28v=vs.84%29.aspx)
Is VarType what you need?
If you want to get the type name of an object assigned to a variable with
Set
, you can useTypeName
instead.