How many data types are supported in Vbscript?

Answers were Sorted based on User's Feedback



How many data types are supported in Vbscript? ..

Answer / jerin

Variant

Is This Answer Correct ?    16 Yes 3 No

How many data types are supported in Vbscript? ..

Answer / 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

How many data types are supported in Vbscript? ..

Answer / abbas khan

There is only one Data Type in vbScript , which is able to
store any kind values such as integer, string, double, date
etc. (We term it as Varient).

To know what kind of value a variable contains,
use "TypeName" keyword.

Example :

Var1 = "abcde"
Msgbox TypeName(Var1) 'OutPut will be string

Var2 = "1234"
Msgbox TypeName(Var2) 'OutPut will be integer

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More VB Script Interview Questions

How will you release the memory acquired by an array variable in vbscript?

0 Answers  


how to store charecters of HARIBABU Using arrays

4 Answers   Cap Gemini,


write a vb script code to display the vbscript word by word (i e 1st it should display v then b and up to t )

1 Answers  


write a vb script to display calculator using case statement?

1 Answers  


How to remove the spaces in a string Ex: "Welcome to QTPWorld" ?

10 Answers   Cap Gemini, CTS,






can anyone send me a vb scripts code for clicking on a link and coming back on home page again does the same for many links on a web page.

0 Answers   Synechron,


I am running a windows based application.While running the script on QTP ,The Application pop-up an Error Message as "object Disabled" in two different scenarios Scenario 1-->The Application pop-up up a Message for Max Session Reached(as the application is set to hold 2 session and if if crosses the pre-defined limit then the error message pop-up) Scenario 2-->When Network connectivity is disabled the Application screen gets greyed out in colour with no operation possible. Now through Exception handling features in QTP ,we need to do the following For Scenarion 1-->Through Exception handling we need to just accept the Message pop-up in the Application and and resume with the call function as is for Scenario 2--> Through Exception Handling featutes on QTP we need to shut down the client , restart the client and resume the call functions as it is Note: The Application returns an Error Message as "object disabled" in both the cases i.e for pop-up message and when the Apllication getting greyed out due to Network failure how can we enhance the script in such a way that for the same error message retured by the application in two different and how to handle them????

2 Answers   Sasken,


Hi, Anybody could tell me What is the 3rd Largest Number in the series..Thanks in Advance..

3 Answers   Amazon, bcbs,


When importing an excel file that has several columns each with different number of rows into QTP's Global datatable, how can you count the number of rows in a particular column?

3 Answers   Logica CMG, McGraw Hill,


Which event is triggered when mouse focus comes out of an element in the vbscript language?

0 Answers  


How to insert snapshot during manual scripting in QTP?

1 Answers  


There are 5 web pages.write a script to click the button on 4th web page.

0 Answers   Accenture,


Categories