• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Day 16. Using ColdFusion Client and Sess... > Understanding Variable Scopes

Understanding Variable Scopes

In the last section, you learned about client variables, one of the three special variable types available to you when you use an Application.cfm file. Recall that a client variable is only valid for a particular client—if a new client visits your site, a new set of client variables comes into play. Also remember that client variables use the prefix client. before the actual variable name. This is called a scope, a term you were introduced to back in Day 9, "Enhancing Your Applications with Variables and If-Then Statements."

When using Application.cfm files and thus employing ColdFusion's client and session management, the scope of your variables becomes very important. There are four variable scopes available, each with its own uses. Look at Table 16.1 for a list and descriptions.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint