Explain VBScript in detail - vbscript

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 typesRange
EmptyVariant is uninitialized. Value is 0 for numeric variables or a zero-length string ("") for string variables.
NullVariant intentionally contains no valid data.
BooleanEither True or False.
Byte0 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
SingleFor negative values: -3.402823E38 to -1.401298E-45
For positive values: 1.401298E-45 to 3.402823E38
DoubleFor 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.
StringIt contains a variable-length string that can be up to approximately 2 billion characters in length.
ObjectIt contains an object.
ErrorIt contains an error number.
What are string functions in VBScript? - vbscript
Asc() - Returns ANSI Character Code Chr() - Returns Character from ANSI Code InStr() - Find a string within another .....
Explain a few date functions in VBScript - vbscript
Date(), Time(), Now(), Left(), Right(), & Mid()......
What is event handling? - vbscript
The actions that are performed by clicking, pressing keys, moving mouse, dragging and dropping etc are called as events.......
Post your comment