At 9:48 PM +1000 10/24/01, Matt Denton wrote:
>Firstly, lThisFld contains the abbrev ID of a fld;
>
>I want to check through one by one the lines of the fld by reference, and could only 
>come up with:
>
>do "if line lCounter of" && lThisFld&& "contains lThisChar then beep"

If I understand your goal correctly, try something like this:

put lThisFld into lFieldVariable -- variables are much faster than fields
repeat for each line L in lFieldVariable -- this is _very_ fast
  if L contains lThisChar then -- do something
end repeat

The repeat for each... structure is by far the fastest way to loop through the 
contents of something.

Depending on what you're doing, though, check out the filter command. If you need the 
lines, not the line numbers, this will be even faster:

filter lFieldVariable with ("*" & lThisChar & "*")

Be sure to keep a safe distance between you and this command, and don't touch the 
machinery for a few minutes afterwards, because it's _fast_. :-)

regards,

Geoff

Reply via email to