Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Parsing pieces into smaller pieces
Message
 
 
To
12/07/2007 11:15:12
Jay Johengen
Altamahaw-Ossipee, North Carolina, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01239718
Message ID:
01239722
Views:
9
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform