From: strk <st...@ke...> - 2006-12-21 14:20:41
|
See also this thread: http://chattyfig.figleaf.com/pipermail/flashcoders/2006-December/177541.h= tml I suggest we always ask there.. got 5 replies in about one hour.. --strk; On Thu, Dec 21, 2006 at 09:06:24AM -0500, Stuart Anderson wrote: > On Thu, 21 Dec 2006, Albrecht Kleine wrote: >=20 > >Hi, > > > >>the macromedia translation of switch is a series of if/else statement= s -=20 > >>I have never tried how > > > >Unfortunately my German version of Moock=B4s little Actionscript book = ("kurz=20 > >& gut") by OReilly > >does not exactly show whether an early "default:" is a syntax error o= r=20 > >not. > >If not, the compiled code should be independent of the "default:"-=20 > >position (IMHO). >=20 >=20 > I just had someone perform a test w/ the IDE, and an early "default:" i= s > not a syntax error, and it does behave in the manner that C programmers > would expect. >=20 > So in the original code: >=20 > i=3D0; // 0 > switch (i) > { > default: y=3D99;break; > case 0: y=3D10;break; // 0 -> 10 > } >=20 > The value for y should be 10, not 99. >=20 >=20 >=20 > Stuart >=20 > Stuart R. Anderson and...@ne... > Network & Software Engineering http://www.netsweng.co= m/ > 1024D/37A79149: 0791 D3B8 9A4C 2CDC A3= 1F > BD03 0A62 E534 37A7 91= 49 > -----------------------------------------------------------------------= -- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share= your > opinions on IT & business topics through brief surveys - and earn cash > http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=3D= DEVDEV > _______________________________________________ > Ming-devr mailing list > Min...@li... > https://lists.sourceforge.net/lists/listinfo/ming-devr --=20 /"\ ASCII Ribbon Campaign \ / Respect for low technology. X Keep e-mail messages readable by any computer system. / \ Keep it ASCII.=20 |