lineoffset doesn't find empty lines
Mark Wieder
mwieder at ahsoftware.net
Sun Aug 16 19:44:27 EDT 2009
Björnke-
Sunday, August 16, 2009, 3:05:09 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.
Or even
put theContent into tAfterVar
put 1 into x
repeat while the number of words in line 1 of tAfterVar is not 0
put line 1 of tAfterVar into tBeforeArray[x]
delete line 1 of tAfterVar
add 1 to x
end repeat
Now you've got:
the lines before the blank line in the array tBeforeArray, indexed
by line number
the lines after (and including) the blank line in tAfterArray
--
-Mark Wieder
mwieder at ahsoftware.net
More information about the use-livecode
mailing list