that's actually something they warn about in C courses.  you must have a
break in your case statements, or it will cascade down the cases after the
first match.  it's defined as "bad programming" in most cases, but all bad
things (infinite loops, etc) have applications in carefully controlled
circumstances.

chris olive, cio
cresco technologies
[EMAIL PROTECTED]
http://www.crescotech.com



-----Original Message-----
From: Michael Dinowitz [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 30, 2001 1:33 PM
To: CF-Talk
Subject: Re: Benefits of <CFSWITCH> vs. <CFSCRIPT> with SWITCH


******************************* Team Allaire *******************************
> Miachael,
>
> Go ahead and "steal" the code.  But in what way is this a hack?
The part where you did a case with no content in it that 'slid' down to the
next case and used the same content. This isn't in any docs and probably
hasn't been thought of by many people.
switch ( foo ) {
case 1 :
case 2 : {
// code
break;
}

> I do find your numbers interesting.  I am a little disappointed at the
> apparent performance hit one takes when using a cfscript switch/case
> statement.
I know that MM people are on list and will probably look into it. I'll also
post it to the bug tracking for CF 5.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to