yes, but not exactly as you hoped...
Keep in mind that when a case evaluates to true, CF will execute EVERYTHING
until it finds a break statement...
so this would do what you want...
<cfscript>
switch( someVal ){
case "a":
case "b":
case "c":
case "d":
case "e":
[execute some code]
break;
}
+-----------------------------------------------+
Bryan Love
Macromedia Certified Professional
Internet Application Developer
Database Analyst
TeleCommunication Systems
[EMAIL PROTECTED]
+-----------------------------------------------+
"...'If there must be trouble, let it be in my day, that my child may have
peace'..."
- Thomas Paine, The American Crisis
"Let's Roll"
- Todd Beamer, Flight 93
-----Original Message-----
From: Kola Oyedeji [mailto:[EMAIL PROTECTED]]
Sent: Thursday, October 10, 2002 9:11 AM
To: CF-Talk
Subject: multiple case values in switch statement in cfscript
Hi
Could anyone tell me if its possible to define multiple case statements
In a switch block in cfscript..
So a cfscript version of :
<cfcase = "a,b,c,d,e" >
Thanks
Kola
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
This list and all House of Fusion resources hosted by CFHosting.com. The place for
dependable ColdFusion Hosting.