Chapter 8, "Using ColdFusion," introduced two ColdFusion tags (<cfoutput> and <cfset>), functions, and variables. This chapter takes CFML one big step further, adding conditional and programmatic processing, the stuff that starts to add real power to your code. The code you wrote in the last chapter was linearColdFusion started at the top of the page and processed every line in order. And although that works for simple applications, more often than not you'll need to write code that does various things based on conditions, such as:
All these require intelligence within your code to facilitate decision-making. Conditional processing is the mechanism by which this is done, and ColdFusion supports two forms of conditional processing:
Let's start by taking a look at these in detail. |