Bug? Compiler Bug?

Similar threads

B4A Tutorial GPS tutorial
B4A Tutorial FirebaseAdMob and User Consent
B4A Tutorial [java] Creating libraries for B4A
B4A Tutorial Service Modules
B4A Tutorial Gnss Status Updates

Robert Valentino

Well-Known Member
Licensed User
I had these lines of code in my program

B4X:
	If sGPS_SendTo <> Null Then IsPaused(sGPS_SendTo) Then 
 	    Log("GPS SendTo is Paused")
	End If
What I meant to type is this

B4X:
	If sGPS_SendTo <> Null And IsPaused(sGPS_SendTo) Then 
 	    Log("GPS SendTo is Paused")
	End If
Wanted the word AND but somehow typed Then.
Why was I allowed two Then's in one line?

Is the first a real valid statement or a compiler bug?
The code compiled and ran fine. Well fine is a relative statement.

The first set of code thought my sGPS_SendTo was Not Null which it wasn't but it Thought the Object sGPS_SendTo was Paused but it was not

BobVal

BobVal
 
Top