Can lineOffSet find last occurance?

Bill Vlahos bvlahos at jpl.nasa.gov
Fri Aug 30 13:25:01 CDT 2002


I need to process a subset of lines in a field which has been sorted. 
All of the group of lines I want are together because of the sort. What 
I'm doing now is using a repeat for each line command and checking each 
line to see if it contains what I'm looking for. This works fine but 
will eventually slow down with big data sets. I would like to use the 
repeat for each feature which includes the starting and ending lines.

The lineOffSet command neatly finds the first line of what I want but 
how can I find the last line? Can lineOffSet be made to start and the 
end?

I could leave the check for what I want and exit the handler after 
starting at the offset but it should be faster if I could remove the 
check. I am confident that the sorting will put what I want together.

Another option would be to put the field into a variable and then 
filter the variable and do the processing on what remains. I don't know 
how much of a performance hit the putting and filtering would be. This 
lineOffSet command seems pretty fast.

Thanks,
Bill Vlahos




More information about the use-livecode mailing list