My program:
(I don't have the code with me but as I remember it:
Dim myarray()As String
Dim Part1, Part2, Part3 As String
...... openfile (containing lines e.g.: 'word1|Word1|werd1')
.......Start Loop .. (While not EOF)
.............read line into Inputstring
myarray() = split(Inputstring,"|"
Part1 = myarray(0)
Part2 = myarray(1)
Part3 = myarray(2)
....... then do things with Part1, Part2, Part3
.......Loop (While)
results in Error 9 "Subscript out of range"
(I haven't got Option Base set, and use the 0 subscript elsewhere in the program)
I can probably make a workaround using the Midstr function
but I am curious to know why the above is happening. A web search turned this up as a known problem but without any
answers to speak of.
(I don't have the code with me but as I remember it:
Dim myarray()As String
Dim Part1, Part2, Part3 As String
...... openfile (containing lines e.g.: 'word1|Word1|werd1')
.......Start Loop .. (While not EOF)
.............read line into Inputstring
myarray() = split(Inputstring,"|"
Part1 = myarray(0)
Part2 = myarray(1)
Part3 = myarray(2)
....... then do things with Part1, Part2, Part3
.......Loop (While)
results in Error 9 "Subscript out of range"
(I haven't got Option Base set, and use the 0 subscript elsewhere in the program)
I can probably make a workaround using the Midstr function
but I am curious to know why the above is happening. A web search turned this up as a known problem but without any
answers to speak of.