yeah, that technique is called a "fall-through", it's very handy, I
use it all the time.
http://livedocs.macromedia.com/flash/8/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Parts&file=00001244.html
On 12/21/06, T. Michael Keesey <[EMAIL PROTECTED]> wrote:
On 12/21/06, Julien Vignali <[EMAIL PROTECTED]> wrote:
>
> switch(condition){
> case A:
> break;
> case B:
> break;
> default:
> // not mendatory but should always be the last statement
> break;
> }
That last break is actually unnecessary. The breaks are only to keep
it from going to the next case. In some (pretty rare) cases, you may
not even want to do that, e.g.:
switch(a) {
case 0:
// Does this if a == 0
break;
case 1 :
// Does this if a == 1.
case 2 :
// Does this if a == 1 or a == 2.
default :
// Does this if a is anything but 0.
}
--
T. Michael Keesey
The Dinosauricon: http://dino.lm.com
Parry & Carney: http://parryandcarney.com
ISPN Forum: http://www.phylonames.org/forum/
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com