Failing to understand the oddities of the "line" chunk
J. Landman Gay
jacque at hyperactivesw.com
Sun Mar 18 22:00:25 EDT 2012
On 3/18/12 6:52 PM, Alex Tweedly wrote:
> You're right (IMHO) - the original reason I struggled to understand this
> was not the trailing delimiter issue, but rather the incorrect handling
> of 'inverted' ranges in a chunk expression.
>
> There are a variety of possible valid interpretations of a inverted
> range (my opinion is that these are, in order):
An inverted range in character chunking equates to an insertion point.
I.e., char 2 to 1 of a line is an insertion point after char 1. Testing
for range inversion is one way to know whether a selection has any content.
The behavior with lines looks like the engine is attempting that but it
isn't acting the same.
> put "a"& cr into t;put "b" into line 2 to -1 of t
equates to "put 'b' into line 2 to 1". If inverted ranges should yield
an insertion point, then the insertion should go after after line 1. So
it isn't acting quite the same way but it looks like it's supposed to.
--
Jacqueline Landman Gay | jacque at hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
More information about the use-livecode
mailing list