bug-apl
[Top][All Lists]
Advanced

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

Re: Selective assignment bug


From: Dr . Jürgen Sauermann
Subject: Re: Selective assignment bug
Date: Fri, 8 Jan 2021 15:17:48 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0

Hi Brian,

thanks, fixed in SVN 1403.

Best Regards,
Jürgen


On 1/7/21 8:13 PM, Mr. Brian B. McGuinness wrote:
I was trying examples of APL code from the book "APL2 At a Glance" in order to become more familiar with APL2 features.  I found an example that doesn't work.

      ]BOXING 8
      SA←10 'ABC' (3 3⍴⍳9) 20 (5 6)
      SA
┌→────────────────────────┐
│10 ┌→──┐ ┌→────┐ 20 ┌→──┐│
│   │ABC│ ↓1 2 3│    │5 6││
│   └───┘ │4 5 6│    └───┘│
│         │7 8 9│         │
│         └─────┘         │
└∊────────────────────────┘

      ,2 2↑3⊃SA
┌→──────┐
│1 2 4 5│
└───────┘

So far, so good.  But when I try the selective assignment I get

      (,2 2↑3⊃SA)←'WXYZ'
      SA
┌→──────────────────┐
│10 ┌→──┐ Z 20 ┌→──┐│
│   │ABC│      │5 6││
│   └───┘      └───┘│
└∊──────────────────┘

when according to the book I should get

┌→────────────────────────┐
│10 ┌→──┐ ┌→────┐ 20 ┌→──┐│
│   │ABC│ ↓W X 3│    │5 6││
│   └───┘ │Y Z 6│    └───┘│
│         │7 8 9│         │
│         └─────┘         │
└∊────────────────────────┘

which is what I would expect.

I hope that this information proves useful. 

I am having fun experimenting with GNU APL and exploring APL2 features.



reply via email to

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