Re: repeat . . . delimit by

2013-09-16 Thread Dr. Hawkins
On Sun, Sep 15, 2013 at 10:30 AM, J. Landman Gay wrote: > If your second delimiter really is a space, then the simple solution is to > use "word" instead of "item" inside the loop. Otherwise you can just do a > replace like this: > > > Not in my case; that was just simple example to show how it co

Re: repeat . . . delimit by

2013-09-15 Thread Peter Haworth
On Sun, Sep 15, 2013 at 4:32 PM, Alex Tweedly wrote: > I do like the idea of " repeat for each ... DELIMITED BY ..." +1 from me too. How about a columndelim property as well as linedelim and itemdelim. Actually I think I came across a columndelim property somewhere that doesn't currently do

Re: repeat . . . delimit by

2013-09-15 Thread Richard Gaskin
Alex Tweedly wrote: On 16/09/2013 00:44, Richard Gaskin wrote: It may also be helpful to remember that lineDel and itemDel are purely arbitrary; that is, they needn't be limited to use only on what we might think of as lines and items. The only general rule governing them is that the engine wil

Re: repeat . . . delimit by

2013-09-15 Thread Alex Tweedly
On 16/09/2013 00:44, Richard Gaskin wrote: It may also be helpful to remember that lineDel and itemDel are purely arbitrary; that is, they needn't be limited to use only on what we might think of as lines and items. The only general rule governing them is that the engine will insist that "lin

Re: repeat . . . delimit by

2013-09-15 Thread Richard Gaskin
om Webzine for LiveCode developers: http://www.LiveCodeJournal.com Follow me on Twitter: http://twitter.com/FourthWorldSys > repeat . . . delimit by Alex Tweedly alex at tweedly.net Mon Sep 16 01:32:46 CEST 2013 Previous message: repeat . . . delimit by Next message: quickl

Re: repeat . . . delimit by

2013-09-15 Thread Alex Tweedly
I do like the idea of " repeat for each ... DELIMITED BY ..." But, in the meantime there might be some alternatives to help your code be nicer. Do you use lines (i.e. process based on CRs) in these loops ? If not, would it help your current code to use the fact that you can change the line

Re: repeat . . . delimit by

2013-09-15 Thread J. Landman Gay
On 9/15/13 11:03 AM, Dr. Hawkins wrote: If I have strng containing A B C1 2 3 then set the itemDel to tab repeat for each item itm in strng put itm set the itemDel to space put item 1 of itm next repeat Will put out A B C A For the first iteration, but 1 1 for the second--it takes up

Re: repeat . . . delimit by

2013-09-15 Thread Dr. Hawkins
On Sun, Sep 15, 2013 at 8:22 AM, Roger Eller wrote: > So, what you want is to set the itemDel temporarily in the repeat, and > return to the previous itemDel after end repeat. Is this correct? > Close: I want the repeat to keep using the itemDel it started with, notwithstanding any change in ite

Re: repeat . . . delimit by

2013-09-15 Thread dunbarx
- From: Dr. Hawkins To: How to use LiveCode Sent: Sun, Sep 15, 2013 11:15 am Subject: Re: repeat . . . delimit by On Sat, Sep 14, 2013 at 5:14 PM, Roger Eller wrote: > Would using a function do the trick? > > repeat for each item theDat in delimitBy(theData,vtab) > do something

Re: repeat . . . delimit by

2013-09-15 Thread Roger Eller
So, what you want is to set the itemDel temporarily in the repeat, and return to the previous itemDel after end repeat. Is this correct? ~Roger On Sep 15, 2013 11:15 AM, "Dr. Hawkins" wrote: > On Sat, Sep 14, 2013 at 5:14 PM, Roger Eller >wrote: > > > Would using a function do the trick? > > >

Re: repeat . . . delimit by

2013-09-15 Thread Dr. Hawkins
On Sat, Sep 14, 2013 at 5:14 PM, Roger Eller wrote: > Would using a function do the trick? > > repeat for each item theDat in delimitBy(theData,vtab) > do something > end repeat > > function delimitBy pData,pDel > set the itemDel to pDel > return pData -- unaltered data > end delimitB > N

Re: repeat . . . delimit by

2013-09-14 Thread Roger Eller
Would using a function do the trick? repeat for each item theDat in delimitBy(theData,vtab) do something end repeat function delimitBy pData,pDel set the itemDel to pDel return pData -- unaltered data end delimitBy ~Roger On Sep 14, 2013 7:10 PM, "Dr. Hawkins" wrote: > While we're aski

repeat . . . delimit by

2013-09-14 Thread Dr. Hawkins
While we're asking for modest syntax changes . . . Being able to state DELIMIT BY in a REPEAT, and having it stick (as opposed to using the current value of the itemdelimiter) would be a huge help. It would avoid ugliness like set the itemDel to vtab repeat for each item theDat in theData set th