parse a line into fields

rev at armbase.com rev at armbase.com
Fri Aug 26 09:31:23 EDT 2005


Hi All.

I've read a binary file containing entries in a database and put each record on
a line in a field.

I dont know how to write in a wee square so imagine the 9 is a square.

The fields has records in it like this
999oppn9999date9999loca9999rslt9999fltr9999note9999rec1999rec2 
999rec399rec4999rec599rec6
Now the number of squares can be variable (normally from 2->4) and the line can
have blank spaces in it (not in amongst the squares)

It seems like the squares are the delimiters. The first entries are the field
names  (eg 6 entries) the later ones (again 6 entries) are the data.
So I could get my data by counting the  number of entries in the line,
divide by two,
put the result into a variable varentries
--and put the entries into a field via
put item  varentries+1 into firstitem
put firstitem into field 1
put firstitem+1 into firstitem
etc etc

But how do I ignore the squares and have them as an entry delimiter.

Heeeeeeeeelp :-)

Cheers
Bob




More information about the use-livecode mailing list