Finding

Scott Rossi scott at tactilemedia.com
Sat Jan 5 21:58:01 EST 2002


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




More information about the use-livecode mailing list