1 / 15

CFIF

CFIF. From the ground up. Who am I. Michael Dinowitz Head of House of Fusion Publisher of Fusion Authority Founding member of Team Macromedia CTO of Dinowitz and Associates Using ColdFusion since June 1995. Boolean. True / False “Yes” / “No” !0 / 0. Basic syntax. <CFIF Boolean>

albert
Télécharger la présentation

CFIF

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CFIF From the ground up

  2. Who am I • Michael Dinowitz • Head of House of Fusion • Publisher of Fusion Authority • Founding member of Team Macromedia • CTO of Dinowitz and Associates • Using ColdFusion since June 1995

  3. Boolean • True / False • “Yes” / “No” • !0 / 0

  4. Basic syntax • <CFIF Boolean> • <CFIF 1> • <CFIF True> • <CFIF “Yes”>

  5. Evaluation - 1 level • <CFIF Variable> • CFIF Is an evaluation zone • <CFIF IsTrue> • Is True is a variable with the value True

  6. Comparison – 1 level • <CFIF “name” is “Michael”> • Comparison syntax IS / EQ / Equal Is Not / NEQ / Not Equal Contains Does not Contain Greater Than / GT Greater Than or Equal To / GTE Less Than / LT Less Than or Equal TO / LTE

  7. Comparison/Evaluation • <CFIF Name is “Michael”> • 2 steps • One for the evaluation of name • The second for the comparison

  8. Functional Comparison • <CFIF IsDefined(‘var’) is True> • 2 steps • 1 for the function evaluation • 1 for the comparison Should be 1 step <CFIF IsDefined(‘var’)> IsDefined returns a boolean

  9. Multiple Clauses • <CFIF clause 1 joiner clause 2> • <CFIF name is “michael” and age is 11> • AND - Clause 1 and clause 2 • OR - either or can be true • NOT - negation • EQV - both clauses must be the same (true of false) • IMP - if clause 1 is true and clause 2 is false, then its false otherwise true • XOR - one or the other but not both

  10. Short Circuited Boolean Evaluation • Introduced in CF 4.01 • Shortens the operation of multi-clause comparisons using logic • If the joiner is AND and the first clause fails, the whole comparison fails • If the joiner is OR and the first clause succeeds then the whole comparison succeeds

  11. Parenthesis • Separates between logical chunks

  12. CFELSE

  13. CFELSEIF

  14. CFSWITCH

  15. CFSET

More Related