VBScript Variables
VBScript Variables
Declaring Variables
You can declare variables with the Dim, Public or the Amsterdam Hotels
Private statement. Like this: Boston Hotels
Chicago Hotels
dim name London Hotels
name=some value Los Angeles Hotels
Miami Hotels
New York Hotels
Now you have created a variable. The name of the New Orleans Hotels
variable is "name". Paris Hotels
Rome Hotels
You can also declare variables by using its name in Hotel Reservations
your script. Like this:
Discount Hotels
Hotel Rooms
name=some value
Web Building
Website Templates
Now you have also created a variable. The name of the Website Builder
variable is "name". Flash Templates
Web Templates
However, the last method is not a good practice, Shopping
because you can misspell the variable name later in Discount Apparel
your script, and that can cause strange results when Online Coupons
your script is running. This is because when you Cooking tools
misspell for example the "name" variable to "nime" the
Men & women clothing
script will automatically create a new variable called
"nime". To prevent your script from doing this you can Office supply
use the Option Explicit statement. When you use this Home Finance
statement you will have to declare all your variables
Shopping UK
with the dim, public or private statement. Put the
Option Explicit statement on the top of your UK Wholesalers
script. Like this:
Mobile Phones
Direct TV
option explicit Plasma TV
dim name Prepaid Phones
name=some value 123 Fast Loans
Software
Meta Search Engine
Read W3Schools
You assign a value to a variable like this:
Hosting Tutorial
WebDev Books
name="Hege"
i=200
Lifetime of Variables
names(0)="Tove"
names(1)="Jani"
names(2)="Stale"
mother=names(0)
dim table(4, 6)
Product Spotlight
Visit MaximumASP
Your Web
Design and
Development
skills don't
matter!
You don't have
to be the
cheapest bidder
to win!
Charging by
the hour is the
worst thing you
can do!
Your clients are
everywhere!
When the
project
finishes, your
income should
not!
Receive 4 FREE
CHAPTERS in your
inbox:
http://www.sitepoint.
com/launch/3a9053/2/4
or read more:
http://www.sitepoint.
com/launch/3a9053/3/4
Search W3Schools:
Go!
Does the world know about us? Check out these places:
How W3Schools
was converted to
XHTML