offset broken?

J. Landman Gay jacque at hyperactivesw.com
Sun Feb 23 11:05:42 EST 2014


I commented on it, I just didn't quote it. That handler is the one that counts from the beginning of the text in each iteration of the loop.  The speed of execution will decrease as the size of the text grows. If your source text is relatively short, your repetitive counting handler will probably be good enough.  

Try a timing test using my version and this one, with a 2 or 3 meg text file as the source text. Better, try it on the text of a novel or the Bible. 

On February 23, 2014 3:57:57 AM CST, Richmond 
>>
>> This should be much faster than your "repeat" example (which counts 
>> characters from the top during each iteration) or a version that 
>> deletes characters from the original data. Try some comparison
>timings 
>> with a very large block of text.
>>
>
>  You AVOIDED commenting on this:
>
>/I made another button with this script:
>//
>//  on mouseUp
>//     put empty into fld "fREZ"
>//     put 1 into INDEKS
>//     repeat until char INDEKS of fld "fORIGIN" is empty
>//     if char INDEKS of fld "fORIGIN" is "o" then
>//       put INDEKS & ", " after fld "fREZ"
>//    else
>//       --do nix
>//    end if
>//    put (INDEKS + 1) into INDEKS
>//    end repeat
>//  end mouseUp
>//
>//  and that returned "13, 18, 27, 42"
>//
>//  a whole lot more useful./
>
>
>No need to work out how far to hop!
>
>Richmond.
>_______________________________________________
>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

-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com




More information about the use-livecode mailing list