Page 1 of 1

switch statement example in the help files

PostPosted: Wed Mar 28, 2007 3:03 pm
by daenerys
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

PostPosted: Wed Mar 28, 2007 4:37 pm
by L. Spiro
Thank you; it will be fixed in the next version.


L. Spiro