|
From: | Juergen Sauermann |
Subject: | Re: [Bug-apl] Formatting of large arrays |
Date: | Tue, 31 Jan 2017 20:22:27 +0100 |
User-agent: | Mozilla/5.0 (X11; Linux i686; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 |
Hi, actually ⎕PW is considered after ⎕CR. ⎕CR of a single line creates a 3 line APL matrix: ⎕PW←30 ⎕PW←30 29⎕CR ⍳15 ┏→━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━┓ ┃1 2 3 4 5 6 7 8 9 10 11 12 13 14 15┃ ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━┛ ⍴ 29⎕CR ⍳15 3 37 Since 37 > ⎕PW the standard APL output breaks every line of the matrix at a suitable place before ⎕PW (so that, for example, numbers are not cut in the middle). If I understand you correcly then you would like to it to look like this (just change the font setting in your email client to make it look nicer): ┏→━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ 1 2 3 4 5 6 7
8 9 10 11 12 ↲ ┃
┃ ↳ 13 14 15
┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
The problem with this is that it is not properly working recursively. If a sub-item is also a large matrix and wrapped at ⎕PW then it wont fit into the containing matrix. An boxed output is normally only used when you have problems with nested values, so the sub-items are almost always nested. /// Jürgen On 01/31/2017 04:00 PM, Elias Mårtenson
wrote:
|
[Prev in Thread] | Current Thread | [Next in Thread] |