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

Chapter 2. ColdFusion Basics > Conditional Processing

2.6. Conditional Processing

Conditional processing makes it possible to implement flow control and decision making within your ColdFusion templates. ColdFusion provides three techniques for applying conditional processing in your programs: if/elseif/else functionality with the <CFIF>, <CFELSEIF>, and <CFELSE> tags, a C-style switch statement with the <CFSWITCH>, <CFCASE>, and <CFDEFAULTCASE> tags, and the IIF( ) function for inline conditionals.

2.6.1. CFIF, CFELSEIF, and CFELSE

If/elseif/else processing allows you to add logical decision-making and flow control to your ColdFusion applications, so you can evaluate an expression and take different actions based upon the results. Basic if/elseif/else processing takes the following form:


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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