Instances Returned by LineOffset

Sarah Reichelt sarah.reichelt at gmail.com
Tue Aug 21 18:07:04 EDT 2007


> Just want to confirm that lineOffset returns only the first instance
> of a match starting from line 1.

Yes, it returns only one matching line. However you can use the
optional third parameter to tell the function where to start looking.

e.g.

lineOffset("blah", myData)   -- returns the number of the first line
containing "blah"
lineOffset("blah", myData, 5)   -- returns the number of the first
line containing "blah" after line 5. You then have to add the 5 back
to the result in order to get the actual line number.

Cheers,
Sarah



More information about the use-livecode mailing list