bug-apl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-apl] indexing of the array


From: Elias Mårtenson
Subject: Re: [Bug-apl] indexing of the array
Date: Sat, 5 Mar 2016 22:35:37 +0800

On 5 March 2016 at 19:12, Juergen Sauermann <address@hidden> wrote:
Hi Alexey,

the IBM APL2 binding rules say that [] binds stronger than vector notation (IBM APL2
language reference page 34). That is,

100 200[1]  is  100 (200[1])

IBM APL2 behaves in the same way as GNU APL.

At first I was confused about this (and even started writing this email expressing that confusion). Then I realised that it is Dyalog that must have a very bizarre evaluator.

What does the following do in Dyalog?

      a ← 1
      2 a[1]

If vector notation binds string that dereference, then this should return 2.

But if that is the case, what does the following return?

      b ← ⍳5
      9 8 b
      9 8 b[2]

Again, if Dyalog is consistent, it should return 8, and not 9 8 2 which is the case in GNU APL.

However, if Dyalog returns the same value as GNU APL, that means that the parser changes the binding strength depending on the type of arguments. That sounds incredibly weird to me.

Regards,
Elias

reply via email to

[Prev in Thread] Current Thread [Next in Thread]