O'Reilly logo

Adobe ColdFusion 8 Web Application Construction Kit, Volume 1: Getting Started by Charlie Arehart, Raymond Camden, Ben Forta

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

If Statements

If statements are a fundamental part of most development languages. Though the syntax varies from one language to the next, the basic concepts and options are the same. If statements are used to create conditions that are evaluated, enabling you to perform actions based on the result.

The conditions passed to if statements always evaluate to TRUE or FALSE, and any condition that can be expressed as a TRUE / FALSE (or YES / NO) question is valid. Here are some examples of valid conditions:

  • Is today Monday?

  • Does variable FirstName exist?

  • Were any rows retrieved from a database?

  • Does variable one equal variable two?

  • Is a specific word in a sentence?

More complex conditions (multiple conditions) are allowed, too:

  • Is today Sunday or Saturday? ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required