bug-apl
[Top][All Lists]
Advanced

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

Re: [Bug-apl] indexing precedence


From: Jay Foad
Subject: Re: [Bug-apl] indexing precedence
Date: Thu, 16 Feb 2017 10:03:46 +0000

This was a breaking change in APL2 (previously 1 2 3[2] was valid and returned 2) but I think it was the right decision for a language with stranding. It means that A[1] B[2] parses as (A[1])(B[2]) which seems sane.

The alternative (ISO, Dyalog) is that A[1] B[2] parses as (A[1] B)[2], which is pretty counter-intuitive.

Jay.

On 15 February 2017 at 20:22, Juergen Sauermann <address@hidden> wrote:
Hi Xiao-Yong,

IBM APL2.

[] binds stronger than anything else.

Thus 3[1 2] is evaluated first, giving the RANK ERROR.

/// J├╝rgen


On 02/15/2017 09:14 PM, Xiao-Yong Jin wrote:
Feature or bug?

      1 2 3[2 1 3]
RANK ERROR
      1 2 3[2 1 3]
          ^^
      )sic
      (1 2 3)[2 1 3]
2 1 3






reply via email to

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