Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Alines()
Message
From
01/07/2006 13:39:38
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
30/06/2006 21:28:57
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Environment versions
Visual FoxPro:
VFP 7 SP1
OS:
Windows XP SP1
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01133139
Message ID:
01133270
Views:
21
>>>>
>>>>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.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform