Hi, I've just checked, Dyalog APL returns exactly what you are expecting from it:
2 a[1] 2 b←⍳5 9 8 b 9 8 1 2 3 4 5 9 8 b[2] 8 Elias Mårtenson <loke...@gmail.com> writes: > On 5 March 2016 at 19:12, Juergen Sauermann <juergen.sauerm...@t-online.de> > 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 > -- Br, /Alexey