Home arrow ColdFusion arrow What You Must Know About ColdFusion Flow-Controls
COLDFUSION

What You Must Know About ColdFusion Flow-Controls


Flow control tags exist to control how a program proceeds. Coldfusion uses conditional processing tags to control the flow. This article covers some of the more important flow control tags in the language, as well as script equivalents.

Author Info:
By: Jayaram Krishnaswamy
Rating: 5 stars5 stars5 stars5 stars5 stars / 7
September 14, 2005
TABLE OF CONTENTS:
  1. · What You Must Know About ColdFusion Flow-Controls
  2. · What if, and where to scenarios
  3. · Which way to go?
  4. · Keep looking until you find
  5. · Breaking out of loops
  6. · Call a halt and end

print this article
SEARCH DEVARTICLES

What You Must Know About ColdFusion Flow-Controls
(Page 1 of 6 )

Flow is the essence of dynamism, and everything living and dynamic has built-in mechanisms to control flow. Programming languages are no exception. They have logic built-in to control how the program proceeds. Procedural languages like FORTRAN and others (even VB6) had a Goto that diverted the flow to take different paths based on decisions. ColdFusion, too, controls the flow of programs by using conditional processing tags, or via <cfscript/>. These conditions may be of different kinds. Some are associated with processing logic which is associated with user input; some depend on certain inherent time triggered events, some others are based on achieving certain pre-determined values of variables, and so forth.

Flow Control Tags

Macromedia documentation details the various categories of flow-control tags that are available as follows:

  • Flow-control: Control of flow from line after line of code processing, to processing lines based on conditions:
    • cfabort
    • cfbreak
    • cfcase
    • cfdefaultcase
    • cfswitch
    • cfif
    • cfelse
    • cfelseif
    • cfloop
  • Flow-control and extensibility:
    • cfexecute
  • Flow-Control and Debugging:
    • cfexit
  • Flow-Control and page Processing:
    • cflocation
    • cfinclude
  • Flow-Control and Exception handling:
    • cftry
    • cferror
    • cfthrow
    • cfrethrow

In this tutorial, the flow-control tags used to control the flow of processing of a file from the normal, default flow direction to some other direction will be discussed. These tags are the ones that show up first in the above list. The other tags in the list are also associated with flow of other kinds. In addition to the tags, <cfscript/> based flow-control is also described.


blog comments powered by Disqus
COLDFUSION ARTICLES

- Adobe ColdFusion Just Got More RAD
- How to Access a SQL Anywhere Database with C...
- CFXML: Probing XMLDOM in ColdFusion
- Creating a Web Service with ColdFusion: the ...
- CFAjax: What it is and How to Use it
- Querying SQL 2000 Server from ColdFusion
- Introduction to ColdFusion Markup Language, ...
- Introduction to ColdFusion Markup Language
- Databases and Dreamweaver MX 2004, concluded
- Databases and Dreamweaver MX 2004
- Welcome to Coldfusion MX 6.1, concluded
- Welcome to Coldfusion MX 6.1
- What You Must Know About ColdFusion Flow-Con...
- What You Must Know About Operators in ColdFu...
- Everything You Must Know About ColdFusion Va...

Watch our Tech Videos 
Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 

Developer Shed Affiliates

 




© 2003-2017 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials