07-09-2010, 12:21 PM
2)Why I cannot use "Dim A as Integer"? I thought its just VB there
As others mentioned above VBScript supports only one data type called ‘Variant’. You just need to declare the variable without any data type, the value assigned to it determine its data type. Its usage determines its data type.
Ex:
As others mentioned above VBScript supports only one data type called ‘Variant’. You just need to declare the variable without any data type, the value assigned to it determine its data type. Its usage determines its data type.
Ex:
Code:
Dim A, B
A = 23
msgbox A
A = "as"
B = A
msgbox A
A =45
C= A
msgbox "B = "& B
msgbox "C="&Cstr(C)