JOIN$ from/to index works only for numeric arrays
issueid=378 29-01-2013 00:07
Super Moderator
Number of reported issues by Petr Schreiber: 162
JOIN$ from/to index works only for numeric arrays
JOIN$ works correctly for numeric arrays, but fails in certain conditions for string arrays

1/ There is little problem with STRING and STRING * n arrays and JOIN$.

When executing this code:
String sLine(5)

sLine(1) = "1"
sLine(2) = "2"
sLine(3) = "3"
sLine(4) = "4"
sLine(5) = "5"

MsgBox 0, Join$(sLine, ",", "", 1, 3)
I get "1,2,3,4,5", but the correct result should be "1,2,3".
Problem = the parameters IndexFrom and Index To are ignored

2/ There is little problem with ASCIIZ arrays and JOIN$.
When executing this code:
Dim sLine(5) As Asciiz * 5

sLine(1) = "1"
sLine(2) = "2"
sLine(3) = "3"
sLine(4) = "4"
sLine(5) = "5"

MsgBox 0, Join$(sLine, ",", "", 1, 3)
I get "1,,,,,2,,,,,3,,,,,4,,,,,5,,,,", but the correct result should be "1 ,2 ,3 ".
Problem = the parameters IndexFrom and Index To are ignored
Problem = there is more delimiters than expected

3/ This problem exists only for string arrays, the code below runs okay:
Long sLine(5)

sLine(1) = 1
sLine(2) = 2
sLine(3) = 3
sLine(4) = 4
sLine(5) = 5

MsgBox 0, Join$(sLine, ",", "", 1, 3)

Petr
Issue Details
Issue Number 378
Project thinBasic
Category Core engine (thinCore.dll)
Status Fixed
Priority 3
Affected Version 1.9.1
Fixed Version 1.9.2
Milestone thinBasic 1.9.2.0
Users able to reproduce bug 0
Users unable to reproduce bug 0
Assigned Users (none)
Tags (none)




29-01-2013 15:46
thinBasic author
I'm fixing it

29-01-2013 22:31
thinBasic author
Fixed
Will be present in next release

+ Reply