Public Sub Test(A As Int)
Dim B As Int = 1
Dim C As Int = 2
Select A
Case B '1
Case C '2
Case (B + C) '3 - CAUSES ERRORS IN COMPILATION
Case Else
End Select
End Sub
It now fails.
It does work if the line 'Case (B + C)' if changed to 'case 3'
I don't know if that is to be expected or it's a bug?
There is no warning or error shown before compilation.
Thanks.
Yes, if fact that is what I have done.
I was just interested in why it had changed and whether it is now working as it should or if it should be as it was!
Actual declaration is:
B4X:
Sub Process_Globals
'These global variables will be declared once when the application starts.
'Public variables can be accessed from all modules.
.....
Public TouchInputs As Int = 1
Public SwitchInputs As Int = 2
Public TouchAndSwitchInputs As Int = TouchInputs + SwitchInputs
.....
End sub
Yes, that also works.
Thanks very much.
I wonder why changing the Arduino ESP board version affects 'Select' though?
At least there are work arounds though!