parse a line into fields
Eric Chatonet
eric.chatonet at sosmartsoftware.com
Fri Aug 26 09:39:43 EDT 2005
Hi Bob,
I would first check that the squares mean all the same char:
In the message box: put charToNum("9") with some "9" picked here and
there.
If it's the same char (I think so): it's the delimiter (when you have
1, 2 or 3 "9", it probably means that the data are empty):
replace "9" with tab in tDataOutput
put tDataOutput into fld "I want to see it"
set the tabstops of the field according to its contents :-)
Hope this helps.
Le 26 août 05 à 15:31, rev at armbase.com a écrit :
> 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.
Best Regards from Paris,
Eric Chatonet.
----------------------------------------------------------------
So Smart Software
For institutions, companies and associations
Built-to-order applications: management, multimedia, internet, etc.
Windows, Mac OS and Linux... With the French touch
Free plugins and tutorials on my website
----------------------------------------------------------------
Web site http://www.sosmartsoftware.com/
Email eric.chatonet at sosmartsoftware.com/
Phone 33 (0)1 43 31 77 62
Mobile 33 (0)6 20 74 50 86
----------------------------------------------------------------
More information about the use-livecode
mailing list