I'll be the first to admit that I am biased toward the use of
<cfscript>, but let's look at this a little closer.

1) It is possible to execute a block of code for more than one value.

<cfswitch expression="#foo#">
        <cfcase value="1,2">
          <!--- code --->
        </cfcase>
..
..
..
</cfswitch>

<cfscript>
switch ( foo ) {
        case 1 :
        case 2 : {
        // code
        break;
        }
..
..
..

}
</cfscript>

2) What is the basis of the statement that says <cfswitch> / <cfcase> is
twice as fast switch / case? Is the test code equivalent?  Has anyone
talked to one of Allaire's programmers about their implementation of
this code? Are you already in a cfscript statement? Or are you starting
a new cfscript block?


--
Josh Meekhof

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to