Azlan Member Licensed User Longtime User Oct 4, 2012 #1 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" Click to expand... 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 & ")" Click to expand... 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.
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" Click to expand... 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 & ")" Click to expand... 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.
Erel B4X founder Staff member Licensed User Longtime User Oct 4, 2012 #2 Seems like a parser bug. Will be fixed in the next update...
Azlan Member Licensed User Longtime User Oct 4, 2012 #3 Hi Erel, No problem. If you want, put us on your beta tester list as we are using B4A pretty much all the time. Cheers.
Hi Erel, No problem. If you want, put us on your beta tester list as we are using B4A pretty much all the time. Cheers.