Using Variables in ColdFusion
If tags and functions are the building blocks of ColdFusion, variables are the building blocks of applications. In Step 1, "The Basics," we briefly touched on the concept of using variables. In this step, we will take a closer look at variables, how they are created, the types of information they can contain, and how we can begin to harness their power in our web applications.
Understanding Variables
According to http://www.whatis.com, a variable is "a quantity capable of assuming any of a set of values." However, as mentioned in Step 1, you can think of a variable as a container that holds information. You create variables by giving them a name and assigning them some value. ColdFusion Server uses server memory to store these values until either you call for them by using the variable name or they are no longer needed, in which case they are deleted.
Two broad categories of variables are used in ColdFusion: simple variables and complex variables. In this step, we will focus mainly on simple variables. Complex variables will be discussed in Step 10, "Using Lists, Arrays, and Structures."