Bug? b4a 6.50 compare to "end" in if clause won't compile

mc73

Well-Known Member
Licensed User
Longtime User
Here's a small example:

B4X:
Dim something As String="end"
   ' this won't compile
   If something="end" Then
   Log("ok")
   End If

The if clause gets red and app will not compile. This happens when comparison is done with "end".
For now I use
B4X:
if something.compareTo("end")=0 then
and it works.
 

Attachments

  • compareToEndBug.zip
    6.1 KB · Views: 159

mc73

Well-Known Member
Licensed User
Longtime User
Confirmed. Did it work in previous versions of B4A?

Note that you can also write it like this and it will work:
B4X:
If "end" = something Then
Yes it worked until 6.30.
 

MarcoRome

Expert
Licensed User
Longtime User
Confirmed. Did it work in previous versions of B4A?

Note that you can also write it like this and it will work:
B4X:
If "end" = something Then
No also in 6.31 same thing

upload_2016-12-12_18-10-56.png
 
Top