nfordbscndrd Well-Known Member Licensed User Longtime User May 2, 2011 #1 In the code below, line 37 is using Test2 as a boolean while line 42 does not identify the Sub Test2(b as Int) As Boolean. Run this without the Debugger and both the Logs tab and the device will show an error at line 44: "Cannot parse as boolean". With the Debugger, they both show the error at line 33 and Debugger stops and highlights that line, even though that line is not where the error is. Code: 26 Sub Test1 27 Log("Test1") 28 29 a = 1 30 b = 2 31 c = 3 32 33 If a = 2 Then 34 a = 1 35 Else If b = 3 Then 36 b = 2 37 Else If Test2(b) AND a = 1 Then 38 c = 1 39 End If 40 End Sub 41 42 Sub Test2(b As Int) 43 Log("Test2") 44 End Sub
In the code below, line 37 is using Test2 as a boolean while line 42 does not identify the Sub Test2(b as Int) As Boolean. Run this without the Debugger and both the Logs tab and the device will show an error at line 44: "Cannot parse as boolean". With the Debugger, they both show the error at line 33 and Debugger stops and highlights that line, even though that line is not where the error is. Code: 26 Sub Test1 27 Log("Test1") 28 29 a = 1 30 b = 2 31 c = 3 32 33 If a = 2 Then 34 a = 1 35 Else If b = 3 Then 36 b = 2 37 Else If Test2(b) AND a = 1 Then 38 c = 1 39 End If 40 End Sub 41 42 Sub Test2(b As Int) 43 Log("Test2") 44 End Sub
Erel B4X founder Staff member Licensed User Longtime User May 3, 2011 #2 It is fixed for the next update. Note that with this fix you will also be able to put a break point in the sub declaration line. Upvote 0
It is fixed for the next update. Note that with this fix you will also be able to put a break point in the sub declaration line.