alecken
2009-02-27 19:55:51 UTC
I know I can do <CFCASE value="1,2,3,4,5,6"> do something </cfcase>
But if I'm evaluation 2 variable values, Can I do :
<cfswitch expression="#variable1# , #variable2#">
<cfcase value="a">
do 1 + 1 = 2
</cfcase>
</cfswitch>
Instead of
<cfif #Variable1# IS "abcd" OR #Variable2# IS "xyz">>
do 1 + 1 =2
</cfic>
So basically if Variable1 IS "ABCD" OR Variable2 IS "xyz" do the same thing
I guess nothing is wrong with using cfif instead of cfswitch but in my
application there are too mane nested cfif already.
But if I'm evaluation 2 variable values, Can I do :
<cfswitch expression="#variable1# , #variable2#">
<cfcase value="a">
do 1 + 1 = 2
</cfcase>
</cfswitch>
Instead of
<cfif #Variable1# IS "abcd" OR #Variable2# IS "xyz">>
do 1 + 1 =2
</cfic>
So basically if Variable1 IS "ABCD" OR Variable2 IS "xyz" do the same thing
I guess nothing is wrong with using cfif instead of cfswitch but in my
application there are too mane nested cfif already.