Dim

Explicitly declare a new variable or array variable.
Syntax
Dim Varname[([subscript])] [,Varname[([subscript])] ...]

Key
Varname Name for the new variable
subscript Number of elements in an array variable

Dim statements are not required unless the VBScript contains an Option Explicit statement.

Unlike many other languages there is no need to specify a data type (integer, string, object etc) All VBScript variables are variants. Most experienced scripters will choose variable names that indicate the data type to be stored e.g. strEmployee.

Examples
Option explicit

Dim myString, price
myString="Hello world"
price=123

Create an Array Variable with 3 elements:
Dim strPrintQueues(2)
strPrintQueues(0)="HP Deskjet 1200"
strPrintQueues(1)="Kyocera first floor"
strPrintQueues(2)="Mikes printer" 

Make a Free Website with Yola.