Join$ inconsitent behavior for 2D case
issueid=339 27-11-2011 23:52
Super Moderator
Number of reported issues by Petr Schreiber: 132
Join$ inconsitent behavior for 2D case
Join$ works okay for both numeric and string arrays in 1D mode, but in 2D mode only the numeric arrays work

It seems the Join$ works OK for numeric and string arrays in 1D mode, but in 2D mode it works only for numeric, please see here:
Long nVector(4)                                           

nVector(1) = 1
nVector(2) = 2
nVector(3) = 3
nVector(4) = 4

MsgBox 0, Join$(nVector, ",") ' -- Gives correctly 1,2,3,4

String sVector(4)                                           

sVector(1) = "a"
sVector(2) = "b"
sVector(3) = "c"
sVector(4) = "d"

MsgBox 0, Join$(sVector, ",") ' -- Gives correctly a,b,c,d

Long nTable(2,2)                                           

nTable(1,1) = 1
nTable(1,2) = 2
nTable(2,1) = 3
nTable(2,2) = 4

MsgBox 0, Join$(nTable, ",", $CRLF) ' -- Gives correctly 1,3
                                    '                    2,4

String sTable(2,2)                                           

sTable(1,1) = "a"
sTable(1,2) = "b"
sTable(2,1) = "c"
sTable(2,2) = "d"

MsgBox 0, Join$(sTable, ",", $CRLF) ' -- Gives incorrectly null length string
                                    ' -- Should give:
                                    ' -- a,c
                                    ' -- b,d

Thanks,
Petr
Issue Details
Issue Number 339
Project thinBasic
Category Core engine (thinCore.dll)
Status Fixed
Priority 4
Affected Version 1.8.9
Fixed Version 1.9.1
Milestone thinBasic 1.9.0.0
Users able to reproduce bug 0
Users unable to reproduce bug 0
Assigned Users (none)
Tags (none)




28-11-2011 08:05
thinBasic author
For some reason JOIN$ code working on 2D strings was commented out
I will try understand why and re-code it

28-11-2011 22:18
thinBasic author
Fixed.
Will be present in next 1.9 refresh.
I will give note about that.

+ Reply