Finding

Richard D. Miller wow at together.net
Sat Jan 5 22:18:01 EST 2002


Scott:

Thanks for the suggestion, but I was thinking of some a little bit
faster...like a true find or search command (which seems to be SORELY
lacking from Rev). The routine you propose is WAY too slow for my needs. It
might work ok for a few hundred lines, but not for thousands.

Richard

> Recently, Richard D. Miller wrote:
> 
>> 2. I have a field with 500 lines, each line containing a number. How do I
>> find all the lines which equal one particular value? Is there anything
>> easier and faster than using something like the offset command in a loop?
> 
> If I understand your question, one way could be like the following:
> 
> put myValue into N
> put fld myField into tData
> put empty into tSummary
> repeat with x = 1 to the number of lines of tData
> if line x of tData = N then put x & "," after tSummary
> end repeat
> delete last char of tSummary
> 
> The variable tSummary should contain a comma delimited list of all line
> numbers in your field which match your test value.
> 
> Regards,
> 
> Scott Rossi
> Creative Director
> 
> Tactile Media, Multimedia & Design
> Email: scott at tactilemedia.com
> Web: www.tactilemedia.com
> 
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution




More information about the use-livecode mailing list