EnriqueGonzalez Expert Licensed User Longtime User Oct 17, 2015 #1 Good day I ran into a problem, B4J 3.70 cannot compile this line example: Code: Select j Case 0,1 End Select the compile error is the follow: B4J version: 3.70 Parsing code. (0.06s) Compiling code. (0.15s) Compiling layouts code. (0.01s) Compiling generated Java code. Error B4J line: 496 Select j javac 1.8.0_60 src\b4j\example\patient.java:1462: error: orphaned case case 1: { ^ 1 error if it is going to take some time to fix or may be i am just crazy, may i have the Link for B4J 3.61? i did not backed up the installer Last edited: Oct 17, 2015
Good day I ran into a problem, B4J 3.70 cannot compile this line example: Code: Select j Case 0,1 End Select the compile error is the follow: B4J version: 3.70 Parsing code. (0.06s) Compiling code. (0.15s) Compiling layouts code. (0.01s) Compiling generated Java code. Error B4J line: 496 Select j javac 1.8.0_60 src\b4j\example\patient.java:1462: error: orphaned case case 1: { ^ 1 error if it is going to take some time to fix or may be i am just crazy, may i have the Link for B4J 3.61? i did not backed up the installer
BeneBarros Active Member Licensed User Longtime User Oct 17, 2015 #2 also I had this problem. I changed my routine. but try quoting Case "0", "1" I believe that works
EnriqueGonzalez Expert Licensed User Longtime User Oct 17, 2015 #3 Thanks benebarros i will try it right away
EnriqueGonzalez Expert Licensed User Longtime User Oct 17, 2015 #4 I tried BeneBarros solution i found that the only Bug (known) is for the 1 and not for the "," or any other integer. it only happens when 1 is present with ",".
I tried BeneBarros solution i found that the only Bug (known) is for the 1 and not for the "," or any other integer. it only happens when 1 is present with ",".
Daestrum Expert Licensed User Longtime User Oct 18, 2015 #5 if you make the variable for the select an object it will work ie, This code won't work Code: dim I as int = 4 select I case 1,2,3: doSomething() case ... .... end select but this will Code: dim I as int = 4 dim II as object = I select II case 1,2,3: doSomething() case .... ... end select In the first snippet the generated src code is incorrect Code: case 3: { RDebugUtils.currentLine=65546; //BA.debugLineNum = 65546;BA.debugLine="Case 3:Log(\"3\")"; anywheresoftware.b4a.keywords.Common.Log("3"); break; } case 4: { case 5: { case 6: { Last edited: Oct 18, 2015
if you make the variable for the select an object it will work ie, This code won't work Code: dim I as int = 4 select I case 1,2,3: doSomething() case ... .... end select but this will Code: dim I as int = 4 dim II as object = I select II case 1,2,3: doSomething() case .... ... end select In the first snippet the generated src code is incorrect Code: case 3: { RDebugUtils.currentLine=65546; //BA.debugLineNum = 65546;BA.debugLine="Case 3:Log(\"3\")"; anywheresoftware.b4a.keywords.Common.Log("3"); break; } case 4: { case 5: { case 6: {
Erel B4X founder Staff member Licensed User Longtime User Oct 18, 2015 #6 This bug is fixed for the next update. As a workaround you can change Select j to Select 0 + j. V3.61 is not available for download.
This bug is fixed for the next update. As a workaround you can change Select j to Select 0 + j. V3.61 is not available for download.