Explain VBScript.
What is VBScript?- This is a scripting language developed by Microsoft.
- It is based on Visual Basic.
- VBScript is designed as 'lightweight' language with a fast interpreter for use in a wide variety of Microsoft environments.
Functions of VBScript:- Its functionality in a web environment is dependent upon either an ASP engine or the windows scripting host.
- It must be used on a windows hosting platform.
- VBScript must be executed within a host environment.
- It can be effectively used for automating day to day office tasks as well as monitoring in the Windows-based environment.
VBScript Data types:- It has only one data type called a Variant.
Variant Data type:- It is a special kind of data type which contains different kinds of information.
- It contains either numeric or string information.
- It behaves as a number when you use it in a numeric context and as a string when you use it in a string context, depending on how it's used.
Variant Subtypes:Following table shows the variant subtypes:Data types | Range |
Empty | Variant is uninitialized. Value is 0 for numeric variables or a zero-length string ("") for string variables. |
Null | Variant intentionally contains no valid data. |
Boolean | Either True or False. |
Byte | 0 to 255 |
Integer | -32,768 to 32,767 |
Currency | -922,337,203,685,477.5808 to 922,337,203,685,477.5807 |
Long | -2,147,483,648 to 2,147,483,647 |
Single | For negative values: -3.402823E38 to -1.401298E-45 For positive values: 1.401298E-45 to 3.402823E38 |
Double | For negative values: -1.79769313486232E308 to -4.94065645841247E-324 For positive values: 4.94065645841247E-324 to 1.79769313486232E308 |
Date (Time) | It represents a date between January 1, 100 to December 31, 9999. |
String | It contains a variable-length string that can be up to approximately 2 billion characters in length. |
Object | It contains an object. |
Error | It contains an error number. |