Am 15.03.23 um 14:43 schrieb Dr. Jürgen
Sauermann:
Hi Hans-Peter,
see below. Note that ⌷ and ⊃ give different
results
in GNU APL and also in IBM APL2 (PC version).
Best Regards,
Jürgen
On 3/14/23 10:12 PM, Hans-Peter Sorge
wrote:
Hi Jürgen,
looks like I have plenty of time,
however, it's being usefully invested:-)
(SVN 1660)
This displays as expected.
X (8⎕CR X ←1 2 3
⊃¨⊂'A' 'CD' 'EF')
A CD EF ┌→──────────┐
│A ┌→─┐ ┌→─┐│
│ │CD│ │EF││
│ └──┘ └──┘│
└ϵ──────────┘
Same in APL2. Note that putting X and (8⎕CR ... on
the same line adds one level of indentation.
A..CD OK, CD...EF one space
more.
X
(8⎕CR X ←1 2 3 ⌷¨⊂'A' 'CD' 'EF')
A CD EF ┌→──────────────┐
│A ┌────┐ ┌────┐│
│ │┌→─┐│ │┌→─┐││
│ ││CD││ ││EF│││
│ │└──┘│ │└──┘││
│ └ϵ───┘ └ϵ───┘│
└ϵϵ─────────────┘
Same in APL2.
In Ref to "V" from previous
conversations ...
Display for "⊃" and "⌷" differ, the bare outputs are
identical.
X
(8⎕CR X ←1 2 3 ⊃¨⊂V)
A 1 2 3 4 5 0 0 0 ┌→────────────────────┐
0 0 0 │A ┌→────────┐ ┌→────┐│
0 0 0 │ │1 2 3 4 5│ ↓0 0 0││
│ └─────────┘ │0 0 0││
│ │0 0 0││
│ └─────┘│
└ϵ────────────────────┘
Same in APL2.
Same layout as before
X
(8⎕CR X ←1 2 3 ⌷¨⊂V)
A 1 2 3 4 5 0 0 0 ┌→────────────────────────┐
0 0 0 │A ┌───────────┐ ┌───────┐│
0 0 0 │ │┌→────────┐│ │┌→────┐││
│ ││1 2 3 4 5││ │↓0 0 0│││
│ │└─────────┘│ ││0 0 0│││
│ └ϵ──────────┘ ││0 0 0│││
│ │└─────┘││
│ └ϵ──────┘│
└ϵϵ───────────────────────┘
Same in APL2.
As a side note.
The output has trailing space(s) included
3 spaces EF...1 OK? Should be 2 spaces?
X ←1 2
3 ⊃¨⊂'A' 'CD' 'EF'
X
1
A CD EF 1
I get 1 leading and trailing space:
Q ← ⍕ X ←1 2 3 ⊃¨⊂'A' 'CD' 'EF' ◊
((' '=ϵQ)/ϵQ)←'∘' ◊ Q
∘A∘CD∘EF∘
4 spaces EF....1 OK? Should be
2 spaces?
X ←1 2 3 ⌷¨⊂'A' 'CD' 'EF'
X
1
A CD EF 1
I get2 trailing spaces:
Q ← ⍕ X ←1 2 3 ⌷¨⊂'A' 'CD' 'EF' ◊
((' '=ϵQ)/ϵQ)←'∘' ◊ Q
∘A∘∘CD∘∘∘EF∘∘
Best Regards
Hans-Peter