Am 06.03.23 um 16:10 schrieb Dr. Jürgen
Sauermann:
Gentlemen,
thanks for the discussion, fixed in SVN 1655.
Hans-Peter, I am sorry that this change creates an
incompatibility in your code.
My thinking for the old solution was this:
V←0 0 0 ◊ V←1 ◊ V ∩ case 1.
1
V←0 0 0 ◊ V[]←1 ◊ V ⍝ case 2.
1 1 1
This applies to GNU APL, APL2, and Dyalog. The question is then if
(A⊃V) in
(A⊃B)←X should behave like case 1 or like case 2 above. The case
(A⊃B)←X
with nested (A⊃B)is described neither in the "IBM APL2 Language
Reference"
nor in the "ISO 13751" standard, leaving some room for
interpretation.
However, both APL2 and Dyalog agree on case 1 and therefore I
changed
GNU APL to behave the same.
Best Regards,
Jürgen
On 3/4/23 8:25 PM, Hans-Peter Sorge
wrote:
Hi,
Works as expected
⊃'Sue' 'Maria' 'Annalisa'
is an array 3 by 8.
⊂⊃'Susan' 'Mary' 'Annalisa'
is an element (⊂) of a 3 by 8 array (⊃'Susan' 'Mary' 'Annalisa'
).
Finally each element in ⊃'Sue' 'Maria' 'Annalisa' gets assigned
an array of ⊃'Susan' 'Mary' 'Annalisa'
Greetings
Hans-Peter
Am 04.03.23 um 16:53 schrieb Mr. Sunday:
Hi,
I have an issue with reassigning an element of a nested
array. Here is an example.
14535:15a:~% apl --version
BUILDTAG:
---------
Project: GNU APL
Version / SVN: 1.8 / SVN: 1651M
Build Date: 2023-03-02 00:25:07 UTC
Build OS: Darwin 21.6.0 x86_64
config.status: default ./configure options
Archive SVN: 1621
var←0 0 0 ⋄ (1⊃var)←5 4 ⋄ (2⊃var)←3 4⍴⍳12 ⋄
(3⊃var)←⊃'Sue' 'Maria' 'Annalisa' ⋄ var ⋄ (3⊃var)←⊂⊃'Susan'
'Mary' 'Annalisa' ⋄ var
┌→────────────────────────────┐
│┌→──┐ ┌→─────────┐ ┌→───────┐│
││5 4│ ↓1 2 3 4│ ↓Sue ││
│└───┘ │5 6 7 8│ │Maria ││
│ │9 10 11 12│ │Annalisa││
│ └──────────┘ └────────┘│
└ϵ────────────────────────────┘
┌→───────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│┌→──┐ ┌→─────────┐
┌→──────────────────────────────────────────────────────────────────────────────────────┐│
││5 4│ ↓1 2 3 4│ ↓┌→───────┐ ┌→───────┐ ┌→───────┐
┌→───────┐ ┌→───────┐ ┌→───────┐ ┌→───────┐ ┌→───────┐││
│└───┘ │5 6 7 8│ │↓Susan │ ↓Susan │ ↓Susan │ ↓Susan
│ ↓Susan │ ↓Susan │ ↓Susan │ ↓Susan │││
│ │9 10 11 12│ ││Mary │ │Mary │ │Mary │ │Mary
│ │Mary │ │Mary │ │Mary │ │Mary │││
│ └──────────┘ ││Annalisa│ │Annalisa│ │Annalisa│
│Annalisa│ │Annalisa│ │Annalisa│ │Annalisa│ │Annalisa│││
│ │└────────┘ └────────┘ └────────┘
└────────┘ └────────┘ └────────┘ └────────┘ └────────┘││
│
│
││
│ │┌→───────┐ ┌→───────┐ ┌→───────┐
┌→───────┐ ┌→───────┐ ┌→───────┐ ┌→───────┐ ┌→───────┐││
│ │↓Susan │ ↓Susan │ ↓Susan │ ↓Susan
│ ↓Susan │ ↓Susan │ ↓Susan │ ↓Susan │││
│ ││Mary │ │Mary │ │Mary │ │Mary
│ │Mary │ │Mary │ │Mary │ │Mary │││
│ ││Annalisa│ │Annalisa│ │Annalisa│
│Annalisa│ │Annalisa│ │Annalisa│ │Annalisa│ │Annalisa│││
│ │└────────┘ └────────┘ └────────┘
└────────┘ └────────┘ └────────┘ └────────┘ └────────┘││
│
│
││
│ │┌→───────┐ ┌→───────┐ ┌→───────┐
┌→───────┐ ┌→───────┐ ┌→───────┐ ┌→───────┐ ┌→───────┐││
│ │↓Susan │ ↓Susan │ ↓Susan │ ↓Susan
│ ↓Susan │ ↓Susan │ ↓Susan │ ↓Susan │││
│ ││Mary │ │Mary │ │Mary │ │Mary
│ │Mary │ │Mary │ │Mary │ │Mary │││
│ ││Annalisa│ │Annalisa│ │Annalisa│
│Annalisa│ │Annalisa│ │Annalisa│ │Annalisa│ │Annalisa│││
│ │└────────┘ └────────┘ └────────┘
└────────┘ └────────┘ └────────┘ └────────┘ └────────┘││
│
└ϵ──────────────────────────────────────────────────────────────────────────────────────┘│
└ϵϵ──────────────────────────────────────────────────────────────────────────────────────────────────────────┘
-- Everyday is Sunday.