Status: New Owner: ---- Labels: Version Type-Bug Priority-Medium OpSys-Any Dist-Any Arch-Any Desktop-Any GUI-Any
New issue 141 by emil.len...@gmail.com: Default/Case Else can be executed even if it matched a Case in a Select Statement. http://code.google.com/p/gambas/issues/detail?id=141 1) Describe the problem. The documentation for Select Statement says "If no CASE statement matches, the DEFAULT or CASE ELSE statement is executed." It says nowhere that the Default/Case Else must be the last case in the list, and for the moment the compiler accepts it to be anywhere. But if you have a testcase after the Case Else/Default it will be matched to, the Case Else/Default case will also be executed. 2) GIVE THE FOLLOWING INFORMATIONS (if they are appropriate): Version: TRUNK or BRANCHES/2.0 or 2.22.0 Revision: r4236 3) Provide a little project that reproduces the bug or the crash. Select Case 0 Default Print "default" Case 0 Print "0" Case 1 Print "1" Case 2 Print "2" End Select will print: default 0 when only "0" is the expected output. ------------------------------------------------------------------------------ RSA(R) Conference 2012 Save $700 by Nov 18 Register now http://p.sf.net/sfu/rsa-sfdev2dev1 _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user