switch statement example in the help files

Find a Bug? Have a Problem? Like to Suggest a Feature? Do it Here

Moderators: g3nuin3, SpeedWing, WhiteHat, mezzo

switch statement example in the help files

Postby daenerys » Wed Mar 28, 2007 3:03 pm

Hi,

I have discovered an documentation error, namely in the "Control Statements" chapter of the help file, section "switch Statements" the BNF and the example for the switch statement. The parenthises {} are missing, so the example will compile with an error. The correct example is:

switch ( value ) {
case 2 : {result = 1; break;}
case 4 : {result = 2; break;}
case 8 : {result = 3; break;}
case 16 : {result = 4; break;}
default : {result = -1;}
}

L. Spiro, you are doing an amazing job. Thank you very much, I appreciate it highly :-)!

danny
daenerys
Hackleberry Fin
 
Posts: 25
Joined: Wed Jul 26, 2006 6:21 pm

Postby L. Spiro » Wed Mar 28, 2007 4:37 pm

Thank you; it will be fixed in the next version.


L. Spiro
User avatar
L. Spiro
L. Spiro
 
Posts: 3129
Joined: Mon Jul 17, 2006 10:14 pm
Location: Tokyo, Japan


Return to Bugs/Problems/Suggestions

Who is online

Users browsing this forum: No registered users and 0 guests