Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
101 VFP7 Things, Part 12 - Alines()
Message
De
18/12/2000 10:34:24
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
101 VFP7 Things, Part 12 - Alines()
Divers
Thread ID:
00454683
Message ID:
00454683
Vues:
49
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.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform