repeat for each....

2003-08-25 Thread Mark Smith
th" end tryLoopWith but this throws up a 'bad chunk expression" : on tryLoopFor put "a,b,c,d,e,f" into charList repeat for each item n in charList put item n of charList into line n of newCharList end repeat put newCharList && "for" end tryLoopFor

Repeat for each

2005-11-04 Thread Marty Knapp
then string these conditions together and search the list for possible matches. I’ve always used the repeat with x= structure and for some reason, can’t seem to get the repeat for each alternative. With this much data, I need something fast. I know even less about arrays, but perhaps they would be

Repeat for each line?

2002-04-18 Thread Magnus von Brömsen
Hi all Experts. I have one list field ("articles") with this handler: on addOrder repeat for each line x in field "articles" if the foregroundColor of x = 204,0,0 then put x after redLine end if end repeat put redLine into field "order" e

Repeat for each assistance.

2003-08-03 Thread fatal error
I have the following loop statement: repeat for each line gameLine in fld "gamelist" I need to obtain the line number for the current iteration. I'm error checking for the number of items in gameLine and if it isn't equal to 5, I want to raise an answer dialog and stop the

Re: repeat for each....

2003-08-25 Thread Ludovic Thébault
On Mon, 25 Aug 2003 13:45:28 +0100, Mark Smith wrote: > I haven't yet been able to make the 'repeat for each...' structure > work at all, not even once, in any circumstance, in a year of trying > it from time to time. I can find nothing in the electronic docs to &

Re: repeat for each....

2003-08-25 Thread Klaus Major
end repeat put newCharList && "with" end tryLoopWith but this throws up a 'bad chunk expression" : on tryLoopFor put "a,b,c,d,e,f" into charList repeat for each item n in charList put item n of charList into line n of newCharList end repeat put

Re: repeat for each....

2003-08-25 Thread Dave Cragg
peat put newCharList && "with" end tryLoopWith but this throws up a 'bad chunk expression" : on tryLoopFor put "a,b,c,d,e,f" into charList repeat for each item n in charList put item n of charList into line n of newCharList end repeat put newCharLis

Re: repeat for each....

2003-08-25 Thread FlexibleLearning
on tryLoopFor   put "a,b,c,d,e,f" into charList   repeat for each item n in charList    put item n of charList into line n of newCharList ** put n of charList into...   end repeat   put newCharList &&"for" end tryLoopFor The variable n contains the item value, not t

Re: repeat for each....

2003-08-26 Thread Geoff Canyon
oopWith Others have answered the "repeat for each" question, but I can't resist: this will also do the trick: on tryLoopWith put "a,b,c,d,e,f" into charList put charList into newCharList replace "," with cr in newCharList put newCharList &a

Re: Repeat for each

2005-11-04 Thread jbv
and item 8 of line x<500 > > I’ve made menu buttons that I select the operators from and a field to > enter a value. My “Process” button would then string these conditions > together and search the list for possible matches. > > I’ve always used the repeat with x= structure

Re: Repeat for each

2005-11-04 Thread SimPLsol
Marty, I have a number of data set similar to yours. One of them required 2 minutes to build the selected list with "repeat with"; it took less than 2 seconds with "repeat for". It worth the effort to master this type of repeat! Paul Looney ___ use-revo

Re: Repeat for each

2005-11-04 Thread Sarah Reichelt
ators from and a field to > enter a value. My "Process" button would then string these conditions > together and search the list for possible matches. > > I've always used the repeat with x= structure and for some reason, can't > seem to get the repeat for each alt

Re: Repeat for each

2005-11-04 Thread Mark Smith
I tend to exclude rather than include in these situations, so something like this? repeat for each line tLine in tData if "word" is not in item 2 of tLine then next repeat if item 4 of tLine <= 2 then next repeat if item 8 of tLine <= 50 OR item 8 of tLine >= 5

Re: Repeat for each

2005-11-04 Thread Marty Knapp
Mark Smith wrote: I tend to exclude rather than include in these situations, so something like this? repeat for each line tLine in tData if "word" is not in item 2 of tLine then next repeat if item 4 of tLine <= 2 then next repeat if item 8 of tLine <= 50 OR

Re: Repeat for each

2005-11-04 Thread Geoff Canyon
amp; "*" & \ tab & "*" & tab & "*" & tab & "*" & tab & "*" & tab & "*" If memory serves though, both of these end up slower than the repeat for each method, surprisingly. Just tested: on 5000 lines of

Re: Repeat for each

2005-11-05 Thread Ken Ray
On 11/4/05 7:40 PM, "Geoff Canyon" <[EMAIL PROTECTED]> wrote: > On Nov 4, 2005, at 2:23 PM, Sarah Reichelt wrote: > >> filter theData with "*word*" > > You could probably get just the lines with "word" in the second item > by doing something like this: > > filter theData with "*" & tab & "*wo

Re: Repeat for each

2005-11-05 Thread Geoff Canyon
lly, you only need to add "*" right after the thing you're checking, and shouldn't need any more "*"s, so this should work just as well: filter theData with "*" & tab & "*word*" & tab & "*" That filter would match any

Re: Repeat for each

2005-11-05 Thread Ken Ray
er theData with "*" & tab & "*word*" & tab & "*" > > That filter would match any line where "word" was in any item from > 2-7 of 8. To nail it down to the second item the filter string has to > include the tabs for all the items.

Re: Repeat for each

2005-11-09 Thread Marty Knapp
s pretty fast - about 1 second (I have an old Mac G4-single processor 867mgz, and running Rev 2.2.1) The speed is exactly the same whether I use the above method or just 'filter theData with "*word*"' When I use the 'repeat for each' to evaluate for 'word&#x

Re: Repeat for each

2005-11-09 Thread Alex Tweedly
amp; "*" put t into fld "Field" put the number of lines in fld "Field" && the millisecs - tStart & cr after msg put t into fld "Field" put URL ("file:D:/Our Documents/Alex/RunRev/asdf.txt") into t put the millisec

Re: Repeat for each

2005-11-09 Thread Marty Knapp
;' That seems terribly slow to me :-) That's what I thought! Interestingly enough in my repeat for each loop I had "set cursor to busy" and that's what was bring this thing to its knees. I knew that a progress indicator was a hog, but had no idea that this would ta

Re: Repeat for each

2005-11-10 Thread Alex Tweedly
ata with "*word*"' That seems terribly slow to me :-) That's what I thought! Interestingly enough in my repeat for each loop I had "set cursor to busy" and that's what was bring this thing to its knees. I knew that a progress indicator was a hog, but had no idea

Re: Repeat for each

2005-11-10 Thread Marty Knapp
>>That's what I thought! Interestingly enough in my repeat for each loop I had "set cursor to busy" and that's what was bring this thing to its knees. I knew that a progress >>indicator was a hog, but had no idea that this would take such a heavy toll. Searches

Re: Repeat for each line?

2002-04-18 Thread Jeanne A. E. DeVoto
At 1:06 AM -0700 4/18/2002, Magnus von Brömsen wrote: >on addOrder > repeat for each line x in field "articles" > if the foregroundColor of x = 204,0,0 then The problem here is that when you use this form of the repeat loop, your variable "x" contains the a

Re: Repeat for each line?

2002-04-18 Thread Magnus von Brömsen
nus von Brömsen wrote: >> on addOrder >> repeat for each line x in field "articles" >> if the foregroundColor of x = 204,0,0 then > > The problem here is that when you use this form of the repeat loop, your > variable "x" contains

Re: Repeat for each line?

2002-04-18 Thread Shao Sean
> repeat with x = 1 to the number of lines of field "articles" i'd replace this line with put the number of lines of field "articles" into vNumberOfLines repeat with x = 1 to vNumberOfLines this way the number of lines is only calculated once instead of through every repeat..

Re: Repeat for each line?

2002-04-18 Thread Jeanne A. E. DeVoto
At 1:20 PM -0700 4/18/2002, Shao Sean wrote: >> repeat with x = 1 to the number of lines of field "articles" > >i'd replace this line with > >put the number of lines of field "articles" into vNumberOfLines >repeat with x = 1 to vNumberOfLines > >this way the number of lines is only calculated

Re: Repeat for each line?

2002-04-18 Thread Shao Sean
> It's only calculated once regardless. that's nice to know =) perhaps making a note in the docs about that? (i thought i saw somewhere that it was calculated every pass, of course that could have been a different language) ___ use-revolution mailing l

Re: Repeat for each line?

2002-04-18 Thread Jeanne A. E. DeVoto
At 4:45 PM -0700 4/18/2002, Shao Sean wrote: >> It's only calculated once regardless. >that's nice to know =) perhaps making a note in the docs about that? Like where it says in the dictionary under "repeat control structure": "As with the for number times form described above, the startValue a

Re: Repeat for each line?

2002-04-18 Thread Shao Sean
> Like where it says in the dictionary under "repeat control structure": that'd probably be the most logical spot, hence the reason why the majority of us have missed it.. perhaps if it was stated in the splash screen as well? ;-) ___ use-revolution ma

Functions and repeat for each

2005-06-07 Thread ron barber
Hi, In an effort to speed up a process of importing, converting and htmling some text I ran across this unexpected (to me) result: put uniencode(return,"Japanese") into unireturn repeat for each line l in thetext put uniencode(l,"Japanese")&unireturn after new

Re: Repeat for each assistance.

2003-08-03 Thread Björnke von Gierke
'repeat for each line...' is faster then 'repeat with x = ...' thus you should best use something like this: repeat for each line gameLine in fld "gamelist" add one to x if x <> 5 then answer (line x) hilite line x of field "gamelist"

Re: Repeat for each assistance.

2003-08-03 Thread yoy
CTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, August 03, 2003 11:21 AM Subject: Re: Repeat for each assistance. > 'repeat for each line...' is faster then 'repeat with x = ...' thus you > should best use something like this: > > repeat for each line gameL

Re: Repeat for each assistance.

2003-08-03 Thread Dan Friedman
Andy, Just insert your own counter: on checkItemCount put 0 into tCounter repeat for each line gameLine in fld "gamelist" add 1 to tCounter if the number of items in gameLine <> 5 then answer (something) set the hilitedLines of field "gameList&qu

Re: Functions and repeat for each

2005-06-07 Thread Dar Scott
On Jun 7, 2005, at 6:24 AM, ron barber wrote: put uniencode(return,"Japanese") into unireturn repeat for each line l in thetext put uniencode(l,"Japanese")&unireturn after newtext end repeat set the unicodetext of fld "Utext" to newtext is much much

"repeat for each" in reverse order ?

2005-06-25 Thread jbv
Hi list, Is there a way to use "repeat for each element thisIndexTerm in listOfTerms" in reverse order, like in "repeat with i=number of items of myVar down to 1" ? Thanks, JB ___ use-revolution mailing list use-revolution@lis

Repeat for each loop assistance, please.

2003-08-02 Thread yoy
I have the following loop statement: repeat for each line gameLine in fld "gamelist" I need to obtain the line number for the current iteration. I'm error checking for the number of items in gameLine and if it isn't equal to 5, I want to raise an answer dialog and stop the

repeat for each-button or field list

2002-09-17 Thread Sannyasin Sivakatirswami
Why doesn't this work? repeat for each button x in this stack put x & cr after tButtonList end repeat put tButtonList or repeat for each field x in this stack put x & cr after tFieldList end repeat put tFieldList ?? Goal: take all values in fields

RE: "repeat for each" in reverse order ?

2005-06-25 Thread MisterX
sort your items to list backwards first ;) > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of jbv > Sent: Saturday, June 25, 2005 11:05 > To: How to use Revolution > Subject: "repeat for each" in reverse order ? > &g

RE: "repeat for each" in reverse order ?

2005-06-25 Thread Jim Bufalini
PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of jbv Sent: Friday, June 24, 2005 11:05 PM To: How to use Revolution Subject: "repeat for each" in reverse order ? Hi list, Is there a way to use "repeat for each element thisIndexTerm in listOfTerms" in reverse order, like in &qu

Re: "repeat for each" in reverse order ?

2005-06-26 Thread Phil Davis
It sounds like you're looking for a feature that doesn't yet exist (or at least I'm not aware of it). I could see having a property that defines the direction in which the 'repeat for each' structure does its looping, like this: set the repeatDirection to "desc

Re: "repeat for each" in reverse order ?

2005-06-26 Thread Mark Smith
How about put the keys of myArray into kList repeat for each line L in kList put cr & L before newKlist end repeat delete char 1 of newKlist repeat for each line L in newKlist --doStuff end repeat It's two loops, admittedly, but unless it's a very big array, it'd be

Re: "repeat for each" in reverse order ?

2005-06-26 Thread Dar Scott
On Jun 25, 2005, at 3:04 AM, jbv wrote: Is there a way to use "repeat for each element thisIndexTerm in listOfTerms" in reverse order, like in "repeat with i=number of items of myVar down to 1" ? I don't think there is an order in 'repeat for each elemen

Re: "repeat for each" in reverse order ?

2005-06-26 Thread Dennis Brown
JB, The repeat for each only goes in forward sequential order starting at the beginning, except for arrays where the order is indeterminate. I have requested a sequential access enhancement to allow for constructing this type of looping in a more flexible way (like parallel instantiation

Re: "repeat for each" in reverse order ?

2005-06-26 Thread Thomas McCarthy
I'm pretty sure you can do it--because I do it (and I'm not a guru) Here's what I do: put the num of items in myVariable into tnum --or lines, or words,or.. repeat with i = tnum down to 1 do something with item i of myVariable --drink coffee end repeat __

Re: "repeat for each" in reverse order ?

2005-06-26 Thread Thomas McGrath III
You can also do repeat with i = (the num of items in myVar) down to 1 -- do something end repeat Tom On Jun 26, 2005, at 7:06 PM, Thomas McCarthy wrote: I'm pretty sure you can do it--because I do it (and I'm not a guru) Here's what I do: put the num of items in myVariable into tnum --or

Re: "repeat for each" in reverse order ?

2005-06-27 Thread Robert Brenstein
It sounds like you're looking for a feature that doesn't yet exist (or at least I'm not aware of it). I could see having a property that defines the direction in which the 'repeat for each' structure does its looping, like this: set the repeatDirection to "desc

Re: "repeat for each" in reverse order ?

2005-06-27 Thread Dennis Brown
The repeat for each only goes in forward sequential order starting at the beginning, except for arrays where the order is indeterminate. I have requested a sequential access enhancement to allow for constructing this type of looping in a more flexible way (like parallel instantiation

Re: "repeat for each" in reverse order ?

2005-06-27 Thread Dar Scott
On Jun 27, 2005, at 1:57 AM, Robert Brenstein wrote: repeat for each element x in y descending Now, is that with keys in descending order or elements in descending order? Dar -- ** DSC (Dar Scott Consulting & Dar's Lab)

Re: "repeat for each" in reverse order ?

2005-06-27 Thread Wouter
Hi, Using the following to reverse the order of lines of a field containing 525605 chars in 14194 lines reversing by: on mouseUp put fld 1 into x put the long seconds into zap repeat for each line i in x put i&cr before tList end repeat put the long seconds - zap put t

Re: "repeat for each" in reverse order ?

2005-06-27 Thread Dennis Brown
can always come up with a way to make it slower. It would be faster to use the slower repeat for i=number of lines in x down to 1 and then put the lines after like your second example. Splitting into an array is usually a good approach if the repeat for each construct will not work. Howeve

Re: "repeat for each" in reverse order ?

2005-06-27 Thread Buster
Dennis, I thought the original question on this thread was: > Hi list, Is there a way to use "repeat for each element thisIndexTerm in listOfTerms" in reverse order, like in "repeat with i=number of items of myVar down to 1" ? Thanks, JB > which has changed to a

Re: "repeat for each" in reverse order ?

2005-06-27 Thread Dennis Brown
Wouter, I was under the impression that JB wanted to read a list sequentially in reverse with the repeat for each to make it go faster, not reverse the list. The split into an array is going to be faster at reading the list in any order given that the repeat for each in reverse does not

Re: "repeat for each" in reverse order ?

2005-06-27 Thread J. Landman Gay
On 6/27/05 8:22 PM, Dennis Brown wrote: I see that our scripting conferences has nothing for arrays in the queue. This might be a good topic based on the number of times it is used as a solution for newbie questions. Noted. ;) -- Jacqueline Landman Gay | [EMAIL PROTECTED] Hype

Re: "repeat for each" in reverse order ?

2005-06-27 Thread jbv
Hi guys, Thanks for spending so much time on my question. I sent a couple of posts during last week end, but they never went through... So here's a short reminder of what I had originally in mind : I only wanted to know if there was a way to benefit the speed of "repeat for each item

Re: "repeat for each" in reverse order ?

2005-06-28 Thread Robert Brenstein
On Jun 27, 2005, at 1:57 AM, Robert Brenstein wrote: repeat for each element x in y descending Now, is that with keys in descending order or elements in descending order? Dar Sorry, Dar, I used element in the loose sense and really meant chunk types: char, word, item, line. When it

Re: "repeat for each" in reverse order ?

2005-06-28 Thread Robert Brenstein
When it comes to the 'each element' form, you are right that it is ambiguous at first glance, but would seem reasonable that sorting applies to the elements themselves since keys are not explicitly entering the picture. To get sorting on keys we would need to say repeat for each

Re: "repeat for each" in reverse order ?

2005-06-28 Thread Dennis Brown
st glance, but would seem reasonable that sorting applies to the elements themselves since keys are not explicitly entering the picture. To get sorting on keys we would need to say repeat for each line tKey in the keys of myArray ascending Oops. My thinking went a bit astray. What you are tal

Re: "repeat for each" in reverse order ?

2005-06-28 Thread Dar Scott
On Jun 28, 2005, at 12:20 AM, jbv wrote: So here's a short reminder of what I had originally in mind : I only wanted to know if there was a way to benefit the speed of "repeat for each item i in myVar" (or "each line" or "each char"...) while reading items

Re: "repeat for each" in reverse order ?

2005-06-29 Thread Buster
Hi Dennis, I'm just curious, but what is wrong with itemOffset? Greetings, Wouter Re: "repeat for each" in reverse order ? Dennis Brown Tue, 28 Jun 2005 07:59:41 -0700 What I would like to see is a way to access the next or previous "element" in a list independen

Re: "repeat for each" in reverse order ?

2005-06-29 Thread Dennis Brown
Wouter, While some variation on the example I showed could be useful and faster than some other possible script variations, all the high level script commands to simulate low level operations are a speed killer relative to the speed of a native method. The repeat for each is truly

Re: Repeat for each loop assistance, please.

2003-08-02 Thread Igor Couto
Hi there, Andy! On Sunday, August 3, 2003, at 01:56 PM, yoy wrote: I have the following loop statement: repeat for each line gameLine in fld "gamelist" I need to obtain the line number for the current iteration. If I understand the docs correctly, the 'repeat for each'

Re: Repeat for each loop assistance, please.

2003-08-02 Thread yoy
, 2003 12:26 AM Subject: Re: Repeat for each loop assistance, please. > Hi there, Andy! > > On Sunday, August 3, 2003, at 01:56 PM, yoy wrote: > > > I have the following loop statement: > > > > repeat for each line gameLine in fld "gamelist" > >

Re: Repeat for each loop assistance, please.

2003-08-02 Thread Scott Rossi
Recently, yoy wrote: > repeat for each line gameLine in fld "gamelist" > > I need to obtain the line number for the current iteration. I'm error > checking for the number of items in gameLine and if it isn't equal to 5, I > want to raise an answer dialog and

Re: Repeat for each loop assistance, please.

2003-08-02 Thread yoy
Whoa! Scott, here I thought everybody was in bed but me. Many thanks! Andy - Original Message - From: "Scott Rossi" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, August 03, 2003 12:55 AM Subject: Re: Repeat for each loop assistance, please.

Re: Repeat for each loop assistance, please.

2003-08-02 Thread Edwin Gore
Sent: Saturday, August 02, 2003 11:08 PM Subject: Re: Repeat for each loop assistance, please. > Whoa! > > Scott, here I thought everybody was in bed but me. > > Many thanks! > > Andy > > - Original Message - > From: "Scott Rossi" <[EMAIL PRO

Re: Repeat for each loop assistance, please.

2003-08-02 Thread Rob Cozens
Hi Andy, What can I query to get the iteration number of this loop? There is no syntax to retrieve the iteration number in a repeat for each loop; so one must initialize and increment a counter variable: put 0 into lineCount repeat for each line gameLine in fld "gamelist"

Re: Repeat for each loop assistance, please.

2003-08-03 Thread Jeanne A. E. DeVoto
At 10:32PM -0700 8/2/03, Edwin Gore wrote: >Scott's method (adding a counter) is absolutely the right way to go. Others >on the list have benchmarked this, and it's MUCH faster than doing the for x >= etc. etc. etc. method. Although it should be pointed out that the speed difference is usually ins

Re: "repeat for each" in reverse order ?

2005-08-13 Thread jbv
oop as in "i = the number of [whatever] > down to 1" the number of would be evaluated each time, I believe, and be > slower. > > Jim > > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] Behalf Of jbv > Sent: Friday, June 24, 2005 11:

RE: "repeat for each" in reverse order ?

2005-08-13 Thread Jim Bufalini
Alex, thanks. That's good to know. -Jim -Original Message- From: Alex Tweedly [mailto:[EMAIL PROTECTED] Sent: Saturday, June 25, 2005 12:33 AM To: [EMAIL PROTECTED]; How to use Revolution Subject: Re: "repeat for each" in reverse order ? Jim Bufalini wrote: >JB &g

Re: "repeat for each" in reverse order ?

2005-08-13 Thread Alex Tweedly
Jim Bufalini wrote: JB put the number of [whatever] into j -- See note: repeat with i = j down to 1 If you put the first line in the loop as in "i = the number of [whatever] down to 1" the number of would be evaluated each time, I believe, and be slower. No, they wouldn't be - they're ca

happy little discovery - "repeat for each key"

2008-10-15 Thread Phil Davis
I don't know why I haven't seen this before, but yesterday I discovered to my great pleasure that we can use array keys in the "repeat for each" structure, like this: repeat for each key tKey in tMyArray put tMyArray[tKey] into fld tKey of this cd end repeat It&#x

Re: repeat for each-button or field list

2002-09-17 Thread David Vaughan
On Wednesday, Sep 18, 2002, at 06:44 Australia/Sydney, Sannyasin Sivakatirswami wrote: > Why doesn't this work? > > repeat for each button x in this stack > put x & cr after tButtonList > end repeat > put tButtonList > ...because button and field are no

Deleting lines within a 'repeat for each' loop

2003-08-19 Thread Martin Steer
Hello There, Just a quick question to everyone here. I've been trying to remove filenames (lines) from the string that the 'files' function returns. The basic algorithm I've been using is below, but I think I've found a problem in the 'repeat for each chunkT

Re: happy little discovery - "repeat for each key"

2008-10-15 Thread Jim Ault
hat we can use array keys in the "repeat for each" > structure, like this: > >repeat for each key tKey in tMyArray > put tMyArray[tKey] into fld tKey of this cd >end repeat > > It's especially useful in cases like th

lineoffset slower than "repeat for each line j" ?

2008-05-29 Thread jbv
ue as 3rd item. Fist I used the following : get lineoffset(tab & "39900",myVar) which happens to take 200 ms when the found line is near the end. Then I tried this : put 0 into x repeat for each line j in myVar add 1 to x if last item of j = "39900

Re: Repeat for each loop assistance, please. Additional URL.

2003-08-02 Thread yoy
The current state of my revolution program is available for inspection at http://mywebpages.comcast.net/foxcat/OmniLotto.rev All help is appreciated. Thanks, again! Andy ___ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailma

Re: Repeat for each loop assistance, please. Additional URL.

2003-08-02 Thread Scott Rossi
Recently, yoy wrote: > The current state of my revolution program is available for inspection at > http://mywebpages.comcast.net/foxcat/OmniLotto.rev Before anyone starts complaining that they're just seeing the stack code in their Web browser, the stack can be accessed directly via the Rev messa

Re: Deleting lines within a 'repeat for each' loop

2003-08-19 Thread Yves COPPE
I think I've found a problem in the 'repeat for each chunkType' control structure in Rev. Here's a little piece of code I was using to test. I've taken the filename checking out of the loop because that's not the problem. Just put this in a button's script an

Re: Deleting lines within a 'repeat for each' loop

2003-08-19 Thread Jan Schenkel
g is below, > but I think I've found a problem in the 'repeat for > each chunkType' > control structure in Rev. > > Here's a little piece of code I was using to test. > I've taken the > filename checking out of the loop because that's not >

Re: Deleting lines within a 'repeat for each' loop

2003-08-19 Thread Ludovic Thébault
On Tue, 19 Aug 2003 18:00:07 +1000, Martin Steer wrote: Try, (if you are sure that you don't need any empty line) : on mouseUp > > put ".ds_store" & return & "Help File 1.xml" & return & "Help File > 3.xml" into fileList > >

Re: Deleting lines within a 'repeat for each' loop

2003-08-19 Thread Robert Brenstein
Hello There, Just a quick question to everyone here. I've been trying to remove filenames (lines) from the string that the 'files' function returns. The basic algorithm I've been using is below, but I think I've found a problem in the 'repeat for each chunk

Re: Deleting lines within a 'repeat for each' loop

2003-08-19 Thread Björnke von Gierke
On Dienstag, Aug 19, 2003, at 10:21 Europe/Zurich, Jan Schenkel wrote: ... on mouseUp put ".ds_store" & return & "Help File 1.xml" & return & "Help File 3.xml" into fileList put 1 into i breakpoint repeat for each line currLine in fileLis

Re: Deleting lines within a 'repeat for each' loop

2003-08-19 Thread Jan Schenkel
--- Björnke_von_Gierke <[EMAIL PROTECTED]> wrote: > > [snip] > > Eh? I always thought that the repeat for each loop > copies the content > it loops over and then uses that too loop. This is > so that looping in > fields is not slower then looping in a variable. I

Re: Deleting lines within a 'repeat for each' loop

2003-08-19 Thread Dar Scott
On Tuesday, August 19, 2003, at 02:00 AM, Martin Steer wrote: repeat for each line currLine in fileList repeat for each line currLine in (fileList & empty) I'm just guessing, assuming that will create a temporary copy for your. An alternate approach would be to build a new list and n

Re: Deleting lines within a 'repeat for each' loop

2003-08-19 Thread Rob Cozens
tab & clientId & return for each lock. When a client logs off, the sever updates the locked record index like so-- set item delimiter to tab put empty into newList put lockedRecordList[sdbDbId] into oldList repeat for each line lockedRecord in oldList

Repeat for each item - should it be more robust ?

2006-02-11 Thread Martin Blackman
Try the following script - repeat for each item tItem in "apple,banana,broccoli" if tItem = "broccoli" then put " - vegetable" after tItem else put " - fruit" after tItem answer tItem end repeat Rev answers 'apple - fruit', 'apple - fruit&#

Delete item won't work in Repeat for each loop

2006-05-24 Thread Ian McKnight
followiing two handlers. Both are executed by Rev Media but removeFields1 doesn't do anything! ie the delete lines do not alter the file. removeFields2 does what its supposed to do. on removeFields1 repeat for each line theRecord in theImportedData delete the last item of theRecord delete word

Re: lineoffset slower than "repeat for each line j" ?

2008-05-29 Thread Mark Schonewille
Hi JB, Repeat for each has proven to be surprisingly fast, before. So, I wouldn't be surprised if it beats the offset function, although I do wonder why the offset function would be that slow. Best, Mark -- Best regards, Mark Schonewille Economy-x-Talk Consulting and Sof

Re: lineoffset slower than "repeat for each line j" ?

2008-05-29 Thread Jim Ault
I would be curious to know how the filter command works with your particular data set. One of the speed difference factors I find is the exact configuration of the data. The filter command works fastest if the 'target' string in the first part of a the line, and repeat for each seems

Re: lineoffset slower than "repeat for each line j" ?

2008-05-29 Thread jbv
d the many lines of code are > deceptive, since the compiled code is amazingly compact and efficient. yep, actually I guess that lineoffset and filter, once compiled, use rather complex routines, while "repeat for each line" remains much closer to raw and efficient C code... JB ___

Re: lineoffset slower than "repeat for each line j" ?

2008-05-29 Thread Richard Gaskin
jbv wrote: actually I guess that lineoffset and filter, once compiled, use rather complex routines, while "repeat for each line" remains much closer to raw and efficient C code... Yes, that's my understanding, at least for the filter command which drops into a rather complex

Re: lineoffset slower than "repeat for each line j" ?

2008-05-29 Thread Ken Ray
> Surprisingly, this takes only 106 ms !!! > If anyone asked me beforehand, I would have sweared that a built-in Rev > function would run faster than a bunch of transcript lines of code... BTW, a very good set of script performance tips by Wil Djykstra are located here: Increasing Script Perform

Re: lineoffset slower than "repeat for each line j" ?

2008-05-29 Thread jbv
Richard, > I don't understand why lineoffset is slower, however, and have submitted > a request to have it reviewed for potential optimization: > I'm wondering if lineoffset could get slower when the wholematches are set to false... I m

Re: lineoffset slower than "repeat for each line j" ?

2008-05-29 Thread Richard Gaskin
Ken Ray wrote: BTW, a very good set of script performance tips by Wil Djykstra are located here: Increasing Script Performance, Parts I-III: http://www.sonsothunder.com/devres/revolution/tips/scrp005.htm http://www.sonsothunder.com/devres/revolution/tips/scrp006.htm http://www.sonsothunder.com/d

Re: lineoffset slower than "repeat for each line j" ?

2008-05-29 Thread Ken Ray
>> BTW, a very good set of script performance tips by Wil Djykstra are located Wil, if you're seeing this, I just want to apologize for mangling your last name - I just realized it should have been "Dijkstra". (Hey, at least I got the "j" in there! :-) Ken Ray Sons of Thunder Software, Inc. Email

Re: Repeat for each item - should it be more robust ?

2006-02-12 Thread Klaus Major
Hi Martin, Try the following script - repeat for each item tItem in "apple,banana,broccoli" if tItem = "broccoli" then put " - vegetable" after tItem else put " - fruit" after tItem answer tItem end repeat Rev answers 'apple - fruit', 'a

Re: Repeat for each item - should it be more robust ?

2006-02-12 Thread Mark Smith
egetable' (There is an extra space in the second answer) I know this is messing with the repeat variable which is ill-advised, but I would have thought rev should be able to handle this. It can be fixed by using a dummy variable, eg - repeat for each item tItem in "apple,banana,bro

Re: Repeat for each item - should it be more robust ?

2006-02-12 Thread Alex Tweedly
Martin Blackman wrote: Try the following script - repeat for each item tItem in "apple,banana,broccoli" if tItem = "broccoli" then put " - vegetable" after tItem else put " - fruit" after tItem answer tItem end repeat Rev answers 'apple - fruit&

Re: Repeat for each item - should it be more robust ?

2006-02-12 Thread Martin Blackman
(tail between legs) well I guess we have agreement there then, thanks for reminding me about the docs! On 12/02/06, Alex Tweedly <[EMAIL PROTECTED]> wrote: > Martin Blackman wrote: > > >Try the following script - > > > >repeat for each item tItem in "apple,banan

  1   2   >