Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Parsing pieces into smaller pieces
Message
 
 
À
12/07/2007 11:15:12
Jay Johengen
Altamahaw-Ossipee, Caroline du Nord, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01239718
Message ID:
01239722
Vues:
8
>The code below creates object properties based on text between the "|" delimiters. There are times when that text will also contain another "^" delimiter (or others). One sledgehammer solution I'm considering is to just replace all the "^" with "|" so that they are broken-up into separate properties (fields ultimately), but wondered if there was a way to trap them while processing in case I eventually need to treat them differently. The resulting properties/fields are manually defined and mapped with a data dictionary, so I don't have to know when there is a "^" delimiter - just that there is a delimiter. Since the "^" delimiters really just define related pieces of information - for example "|Jay^Johengen|" contains FName and LName, I think going with the sledgehammer might work because I'm mapping both fields eventually anyway. Any thoughts?
>
>
>FOR ix=1 TO OCCURS('|',m.tcLine)
>	ADDPROPERTY(loRecord, 'Field'+PADL(m.ix,3,'0'), STREXTRACT(m.tcLine,'|','|',m.ix,2))
>ENDFOR
>
Would it be possible to end up with more than 255 fields in this situation?

Also I guess you need to use alines again to use two different delimiters.
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform