How many data types are supported in Vbscript?

Answer Posted / satya

All variables in VBScript are a data type called Variant.
This means that you do not (and cannot)
explicitly declare the variable type. In fact, with
VBScript you do not need the Dim statement to allocate
storage for a variable. At runtime, the Parser in the
VBScript Scripting Engine determines the Variant
data subtype to be used.

Variant data subtypes Subtype Description
Boolean - Either True or False
Byte - Contains integer in the range 0 to 255
Currency Floating-point number in the range -
922,337,203,685,477.5808 to 922,337,203,685,477.5807
Date(Time)- Contains a number that represents a date
between January 1, 100 to December 31, 9999
Double -Contains a double-precision, floating-point number
in the range -1.79769313486232E308 to -
4.94065645841247E-324 for negative values;
4.94065645841247E-324 to 1.79769313486232E308 for positive
values
Empty -Uninitialized Variant
Error -Contains an error number used with runtime errors
Integer -Contains integer in the range -32,768 to 32,767
Long Contains integer in the range -2,147,483,648 to
2,147,483,647
Null -A variant containing no valid data
Object- Contains an object reference
Single -Contains a single-precision, floating-point number
in the range -3.402823E38 to -1.401298E-45
for negative values; 1.401298E-45 to 3.402823E38 for
positive values
String Contains a variable-length string that can be up to
approximately 2 billion characters in length.

The Parsers choice of data subtype will depend on how the
variable is used in a statement or function.
Note that a variable’s subtype can change within a code
segment.

Is This Answer Correct ?    6 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can u describe what kind of testing are for OTC derivates by banks.

1869


how to increase the values in text box in a given text box increament by two values by clicking on button

1853


what is the object hyrarchy in QTP for a web based application

2088


What is event handling in vbscript?

790


What are the different types of loops available in the vbscript language?

720


What is byref and byval parameters in vbscript?

807


Mention what is the main difference between function and sub-procedure?

746


Explain about adodb.stream class?

806


PLz send me the VB scripts which is having more examples my email id : hareen_11@yahoo.com

1854


What is the use of option explicit in vbscript?

741


How will you get a combined string from array of string in vbscript?

723


how does vb script help in web page designing? explain with example.

1756


Write a code to print numbers from 5 to 0?

911


How to delete a cookie using vbscript?

780


I have attended Anovatek Software QTP interview. They will give us computer and one web based application with QTP. We have to automate some records (already updated records or new records) using QTP Data driven testing. But we should use for loop? Can any one know how to do data driven testing using For loop?

1738