>>>>
>>>>Tamar.
>>>>I've got only 28,641 lines and I'm getting "subscript out of range...." error.
>>>>hmmmm......
>>>
>>>Actually there are over 70,000 lines, but it craps out after 28,640 lines.
>>
>>70,000 lines in a memo field? Or text file?
>>
>>Regardless, it sounds like alines() might not be the tool for the job.
>>
>>What's the goal?
>
>Note that mline(), etc., work for an arbitrary text expression, not just memo fields. Despite the name. (And the help file.)
And the little known fact about the _mline system variable, which keeps the beginning of the next line (as a byte offset). So while
for i=1 to memlines(c)
?mline(c,i)
endfor
might work fine, this would be much better (or at least faster):
_mline=1
for i=1 to memlines(c)
?mline(c, 1, _mline)
endfor
because in the latter case Fox knows exactly where to start and doesn't count lines until the ith. Try with a huge string and you'll notice the difference.