Bug?: Concatenating strings

corwin42

Expert
Licensed User
Longtime User
This gives a syntax error:

B4X:
str = "This " & 2 + 2 & " is a test"

but this

B4X:
str = "This " & (2 + 2) & " is a test"

works fine.

Bug or feature?
 

corwin42

Expert
Licensed User
Longtime User
Expected behaviour when you consider operator precedence.

Is there somewhere a list of all operators with its precedence? I haven't found one.
 
Top