| << 4.0.0- Variables | Chapter4 | 4.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- Variables | Chapter4 | 4.1.1- Creating a Variable >> |

RSS

