bug-apl
[Top][All Lists]
Advanced

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

Re: nested array formating is inconsistent


From: Louis Chretien
Subject: Re: nested array formating is inconsistent
Date: Thu, 26 Aug 2021 13:11:04 -0400

I tried the same examples in APL/X and Dyalog APL.

APL/X seems to give the same results as GNU APL: but both enclose are indented right by one column



But Dyalog APL has quite a different result: no blank lines between rows.


On Aug 26, 2021, at 12:44, Dr. Jürgen Sauermann <mail@xn--jrgen-sauermann-zvb.de> wrote:

Hi again,

checking the same in IBM APL2, the behaviour of GNU APL seems correct.
(see attached Screenshot).

Best Regards,
Jürgen




On 8/26/21 5:58 PM, Dr. Jürgen Sauermann wrote:
Hi Hans-Peter,

thanks, I will look into this.

The general problem is that the rules how nested values with rank ≥ 2 should
be displayed are, at least as far as I know, nowhere specified in a formal fashion.
From old APL 1 we know that the higher dimensions (> 2) of a not-nested value
shall be separated by a number of empty lines, but we don't really know, for example,
 how these separator lines should be handled when the value is being enclosed.

To me it is not clear if there is a line missing in
⊂¨2 2 ⍴ e or if there maybe is a line
too much in 
⊂2 2 ⍴ e (even though that way it looks a little nicer).

Best Regards,
Jürgen



On 8/26/21 11:29 AM, Hans-Peter Sorge wrote:
Hi,


⍝ just a simple matrix

      i∘.+i←¯1+⍳2
0 1
1 2

⍝ make it an element
      ⎕ ← e ← ⊂i∘.+i←¯1+⍳2
 0 1
 1 2


⍝ matrix of matrixes....
      2 2 ⍴ e
 0 1   0 1
 1 2   1 2

 0 1   0 1
 1 2   1 2


⍝ enclose the matrix of matrixes indents nicely ...
      ⊂ 2 2 ⍴ e
  0 1   0 1
  1 2   1 2

  0 1   0 1
  1 2   1 2


⍝ display of enclose each 'sub'-matrix misses space line
      ⊂¨2 2 ⍴ e
  0 1   0 1
  1 2   1 2
  0 1   0 1
  1 2   1 2

Best Regards
Hans-Peter


<APL2.png>


---
Louis Chrétien





reply via email to

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