lineoffset doesn't find empty lines
Mark Wieder
mwieder at ahsoftware.net
Sun Aug 16 18:05:09 EDT 2009
Björnke-
Sunday, August 16, 2009, 2:52:01 PM, you wrote:
> yes it's more complex. among other things i want to divide the data at
> the empty line into two vars, delete the next line (if another
> condition is met), and put part of the lines (not all) of the parts
> before the empty line into an array (tho i can use lineoffset for
> those!). mark's solution can do what i want, but it's certainly not
> very straightforward.
Well, why didn't you say so? <g>
put 1 into x
repeat for each line tEmptyLine in theContent
if the number of words in tEmptyLine is 0 then
exit repeat
end if
add 1 to x
end repeat
put x
(use "the number of tokens" if you also want to ignore lines that are
just comments)
--
-Mark Wieder
mwieder at ahsoftware.net
More information about the use-livecode
mailing list