Counting lines

Dar Scott dsc at swcp.com
Wed Mar 24 11:32:50 EST 2004


On Wednesday, March 24, 2004, at 07:40 AM, Graham Samuel wrote:

> However, if you start with an empty field and execute A then B, you 
> end up with the second string put before the first string on line 1. 
> If you reverse the order to B then A, A overwrites B. There are also 
> variations on this with negative line numbers.
>
> Do you think I can rely on this, or is it just an unplanned quirk as 
> far as the RR engine is concerned?

One model is that line 0 is before the first line.  That is, 'put x 
into line 0 of y' is like 'put x before y', only there might be a 
line-end character stuck in there some place.

I don't understand how that works with negative numbers since there is 
no distinct negative 0.  'put x into line ((number of lines of y)+1) of 
y' might have a similar effect?  (Is that affect, Ken?)

Rely on it?  Can't say.

Dar Scott



More information about the use-livecode mailing list