B4X:
Dim temp1 As String ="hello" & "," & "hello"
Will generate error:
Compiling code. Error
Error parsing program.
Error description: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
Occurred on line: 1267
Dim temp2 As String ="hello" & "," & "hello"
Whereas:
B4X:
Dim temp1 As String ="hello" & ", " & "hello"
Will compile Ok, a space after the comma.
Likewise the following will generate an error
B4X:
Dim v1, v2 As Int = 0
Dim temp1 As String = "test(" & v1 & "," & v2 & ")"
Compiling code. Error
Error parsing program.
Error description: Unknown type: &
Are you missing a library reference?
Occurred on line: 1267
Dim temp1 As String = "test(" & v1 & "," & v2 & ")"
and
B4X:
Dim temp1 As String = "test(" & v1 & ", " & v2 & ")"
is ok, space after the comma.
If assigned like this no problem
B4X:
Dim temp1 As String : temp1 = "test(" & v1 & "," & v2 & ")"
Cheers.