Format text data records for processing in Livecode
Kaveh Bazargan
kaveh at rivervalleytechnologies.com
Tue Feb 26 16:26:15 EST 2019
I have an handler that needs the itemdelimiter to be unique every time I
call it, and that can be several times in quick succession. I use:
wait 1 millisecond
set the itemdelimiter to the milliseconds
The first line ensures that two successive loops do not have the same
itemdelimiter, and it is almost guaranteed to be unique every time.
On Tue, 26 Feb 2019 at 17:41, Ralph DiMola via use-livecode <
use-livecode at lists.runrev.com> wrote:
> Option 2: The item delimiter can be multiple characters so you can set it
> to
> something that would never likely be in the text.
> Example: Set the itemdel to "<neverHappenInMyText>"
>
> Ralph DiMola
> IT Director
> Evergreen Information Services
> rdimola at evergreeninfo.net
>
> -----Original Message-----
> From: use-livecode [mailto:use-livecode-bounces at lists.runrev.com] On
> Behalf
> Of dunbarxx via use-livecode
> Sent: Tuesday, February 26, 2019 10:58 AM
> To: use-revolution at lists.runrev.com
> Cc: dunbarxx
> Subject: Re: Format text data records for processing in Livecode
>
> Hi.
>
> Since you may have any number and kind of characters in any of the fields
> in
> each record, I would append a character that is unlikely ever to appear in
> any context. I like numToChar(202), but others like numToChar(3) or
> numtoChar(8).
>
> Then you can set the itemDelimiter to that char, and be sure that you are
> parsing the totality of each field within any record.
>
> Craig Newman
>
>
>
> --
> Sent from:
> http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
--
Kaveh Bazargan
Director
River Valley Technologies <http://rivervalleytechnologies.com/> • Twitter
<https://twitter.com/kaveh1000> • LinkedIn
<https://www.linkedin.com/in/bazargankaveh/>
More information about the use-livecode
mailing list