Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
101 VFP7 Things, Part 12 - Alines()
Message
From
18/12/2000 10:34:24
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Other
Title:
101 VFP7 Things, Part 12 - Alines()
Miscellaneous
Thread ID:
00454683
Message ID:
00454683
Views:
48
Alines() now lets you specify how to parse your lines. You can give it what characters to break at. For eaxmple:

?ALINES(aArray, 'That method. Thisform.Show() is the right method.', .f., '.')

Gives you 3 lines, all stopping where there is a period.

?ALINES(aArray, 'That method. Thisform.Show() is the right method.', .f., '. ')

Gives you 2 lines, because it stops at the combination of a "." and a space.

?ALINES(aArray, 'That method. Thisform.Show() is the right method.', .f., '.', 't')

Gives you 8 lines, because it stops wherever there is a '.' or a 't'. Because in VFP6, it only stopped at CR, LF or a combination and then stripped them off, it may not be obvious right away that breaking on a "." strips all the periods out. So keep that in mind. Because of VFPs Parameter limit, you can pass up to 23 parsing characters.
Next
Reply
Map
View

Click here to load this message in the networking platform