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

What's Next

This chapter demonstrated how to create and manipulate ColdFusion variables with <cfset>. You learned how to use <cfparam> to test for a variable's data type and, later in the chapter, to assign a default value for a variable that may not exist. You learned how to use <cfoutput> to retrieve a variable's value from memory and incorporate it into the output page you were building. Additionally, you learned about the many different variable scopes ColdFusion maintains and what order of precedence ColdFusion uses to look through them. Finally, you saw how to use URL, Form, and CGI variables in ColdFusion scripts.

The scripts you have used thus far have been linear in nature. Every command is processed in the order in which it appears in the script. Sometimes, though, you need to process commands conditionally—executing the commands in some instances, but not in others. ColdFusion allows you to do so by means of the <cfif> and <cfswitch> instructions. The next chapter introduces you to these tags and how you can use them to implement conditional logic.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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