Thanks Jacque. I kept seeing it as "line 2 to the end" and so expected it to go there.

I now see it; so I can simply do

constant infinity=9999999999
put "a" & CR into t; put "b" into line 2 to infinity of t

and I get the right (i.e. desired :-)  answer.

Thanks !!
-- Alex

On 17/03/2012 16:33, J. Landman Gay wrote:
On 3/17/12 8:16 AM, Alex Tweedly wrote:
This code
put "a" & CR into t; put "b" into line 2 of t; put t
produces (as I would expect)
a
b
BUT
put "a" & CR into t; put "b" into line 2 to -1 of t; put t
produces
ba
Why should adding the "to -1" change this to put the new data before
what was there before ?

It's because of how the engine ignores trailing delimiters. The variable t contains only one line, so "line 2 to -1" evaluates to "line 2 to 1".



_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to