Failing to understand the oddities of the "line" chunk
J. Landman Gay
jacque at hyperactivesw.com
Sat Mar 17 12:33:39 EDT 2012
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".
--
Jacqueline Landman Gay | jacque at hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
More information about the use-livecode
mailing list