On Sun, 19 Sep 2021, Riccardo (Jack) Lucchetti wrote:
On Sun, 19 Sep 2021, Sven Schreiber wrote:
> Am 17.09.2021 um 21:41 schrieb Riccardo (Jack) Lucchetti:
>> On Fri, 17 Sep 2021, Allin Cottrell wrote:
>
>> Aha, my bad, sorry, I had mis-diagnosed the problem. The problem arises
>> with the $coeff accessor. For example:
>>
>> <hansl>
>> open data4-1
>> ols 1 0 2 3 4
>> b = $coeff[end-2:]
>> </hansl>
>
> So apart from these special hiccups, is the new (but experimental)
> syntax supposed to work for indexing in general, including arrays?
As far as my understanding goes, yes, but I think it'd be wise to wait for
one (or maybe two) release cycle(s) before advertising it as official.
When Sven posted his question, use of 'end' with array indexing was
not working in all cases but it should be OK now. Jack's case of
indexing into $coeff using 'end' should also be OK. And the current
git state is now in the snapshots.
As I mentioned previously, the 'end' implementation has certain
known failure modes in principle, but I don't believe they're
practically reachable. If 'end' doesn't work with a matrix or array
that you're actually able to allocate, that would count as a bug ;-)
Allin