bug-apl
[Top][All Lists]
Advanced

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

Output variants for pick and index operators


From: Hans-Peter Sorge
Subject: Output variants for pick and index operators
Date: Tue, 14 Mar 2023 22:12:08 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0

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││  
           │  └──┘ └──┘│  
           └ϵ──────────┘ 

A..CD  OK, CD...EF one space more.
     X (8⎕CR  X ←1 2 3 ⌷¨⊂'A' 'CD' 'EF')
 A  CD   EF    ┌→──────────────┐  
               │A ┌────┐ ┌────┐│  
               │  │┌→─┐│ │┌→─┐││  
               │  ││CD││ ││EF│││  
               │  │└──┘│ │└──┘││  
               │  └ϵ───┘ └ϵ───┘│  
               └ϵϵ─────────────┘


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 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│││  
                         │                │└─────┘││  
                         │                └ϵ──────┘│  
                         └ϵϵ───────────────────────┘

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 

4 spaces EF....1 OK? Should be 2 spaces?
      X ←1 2 3 ⌷¨⊂'A' 'CD' 'EF'
     X 1
 A  CD   EF    1

Best Regards
Hans-Peter


reply via email to

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