myarray
(i
) = "This is line " + STR$(i
) B$
= B$
+ myarray
(i
) + CHR$(13) + CHR$(10)
' we have a sequential file of strings to load
'alternate open
Split1000 B$
, CHR$(13) + CHR$(10), myarray
()
'notes: REDIM the array(0) to be loaded before calling Split '<<<<<<<<<<<<<<<<<<<<<<< IMPORTANT!!!!
' bplus modifications of Galleon fix of Bulrush Split reply #13
' http://xmaxw.[abandoned, outdated and now likely malicious qb64 dot net website - don’t go there]/forum/index.php?topic=1612.0
' this sub further developed and tested here: \test\Strings\Split test.bas
copy = mystr 'make copy since we are messing with mystr when the delimiter is a space
'special case if delim is space, probably want to remove all excess space
copy
= MID$(copy
, 1, p
- 1) + MID$(copy
, p
+ 1) curpos = 1
arrpos = 0
dpos
= INSTR(curpos
, copy
, delim
) arr
(arrpos
) = MID$(copy
, curpos
, dpos
- curpos
) arrpos = arrpos + 1
curpos = dpos + LD
dpos
= INSTR(curpos
, copy
, delim
) arr
(arrpos
) = MID$(copy
, curpos
)