Basically we will store numbers,names,date,time.. etc in different variables,so these numbers(Integer),name (String),Date( date),Time(Time) are known as data types.
In fact VB Script we have only one type of data type Called VARIANT.
We declare variables in Vb Script using DIM keyword.
Ex. dim variable1;
Here variable1 is the type of VARIANT.
Variant is a special kind of data type which can hold different kinds of information.
These different categories of information that can be contained in a Variant are called sub types.
Click to know about Scope of variables in Vb Script
In fact VB Script we have only one type of data type Called VARIANT.
We declare variables in Vb Script using DIM keyword.
Ex. dim variable1;
Here variable1 is the type of VARIANT.
Variant is a special kind of data type which can hold different kinds of information.
These different categories of information that can be contained in a Variant are called sub types.
Variant Sub types:
- Integer : Using 2 bytes to express signed integer in the range -32,768 to 32,767.
- Single : Using 4 bytes to express real numbers in floating-point format ranging from -3.402823e38 to -1.401298e-45 for negative values, and from 1.401298e-45 to 3.402823e38 for positive value.
- Double : Using 8 bytes to express real numbers in floating-point format ranging from -1.79769313486232e308 to -4.94065645841247e-324 for negative values, and from 4.94065645841247e-324 to 1.79769313486232e308 for positive values.
- Long : Using 4 bytes to express signed integers ranging from -2,147,483,648 to 2,147,483,647.
- String : Using 1 byte per character to express a sequence of characters that can be up to approximately 2 billion characters.
- Boolean : Using 2 bytes to contain either True or False.
- Empty : A special subtype to represent a variable that has not been assigned with any value yet.
- Nothing
- Null : A special subtype to represent a variable assigned with a null value.
- Object : A special subtype to represent a reference to an object.
- Error : A special subtype to represent an error number.
- Date : A special subtype to represent the date.
- Time: A special subtype to represent the time.
- Byte: Using 1 byte to express integer in the range 0 to 255.
- Currency: Using 8 bytes to express real numbers in decimal format ranging from -922,337,293,685,477.5808 to 922,337,293,685,477.5807
Click to know about Scope of variables in Vb Script
No comments:
Post a Comment