Page

4.1.0- What is a Variable?

  by NT Community Manager.
Last Updated  by NT Community Manager.  

PublicCategorized as 04. Variables.

Not tagged.
<< 4.0.0- VariablesChapter44.1.1- Creating a Variable >>

What is a Variable?

A variable is a section ofmemory that is allocated a name by the programmer. These sections of memory canbe used to store pieces of information that will be used in the program. Thinkof variables as you might think of boxes. They're simply containers forinformation that you wish to store. For example, here are three variables –they contain a string of text, a numerical value, and a date respectively:

 

Dim CapitalCityOfUK

Dim NumberOfStates

Dim IndependenceDay

 

CapitalCityOfUK = "London"

NumberOfStates = 50

IndependenceDay = #7/4/1863#

 

Any variable is empty until you put information into it(although the memory space is reserved while the script runs). You can thenlook at the information inside the variable, get the information out, orreplace the information with new data. In fact, variables are essential forstoring data in any computer language; in this book, we'll discuss variables inthe context of VBScript and ASP.

<< 4.0.0- VariablesChapter44.1.1- Creating a Variable >>

Copyright © 2003 by Wiley Publishing, Inc.

Powered by Near-TimeTerms of Services | Privacy Policy | Security Policy |