Vectors displaying as one column matrix

APL-related discussions - a stream of APL consciousness.
Not sure where to start a discussion ? Here's the place to be
Forum rules
This forum is for discussing APL-related issues. If you think that the subject is off-topic, then the Chat forum is probably a better place for your thoughts !

Vectors displaying as one column matrix

Postby paulmansour on Thu Apr 12, 2018 1:29 pm

I notice in V16, that when a vector of vectors is returned from ⎕CMD it displays in the session as if it were a 1 column matrix of vectors (no line break chars involved). This is nice, it is much easier to read, but also slightly confusing. Has this always been this way? Is it new for v16? It it only for ⎕CMD? Or is it a more generally applicable feature. Is there some setting? Or is it a bug?
paulmansour
 
Posts: 259
Joined: Fri Oct 03, 2008 4:14 pm

Re: Vectors displaying as one column matrix

Postby JohnS|Dyalog on Thu Apr 12, 2018 2:13 pm

This is a deliberate decision and has always been the case. It mimics Unix's /bin/ls command where, if output is to /dev/tty, you get pretty printing. Otherwise, if output is redirected, you get a word per line. AFAIK, it is specific to ⎕CMD/⎕SH. Anything to the left of the system function, which "consumes" the result, forces it to be a vector of vectors.

On my Mac:
User avatar
JohnS|Dyalog
 
Posts: 172
Joined: Wed Sep 10, 2008 10:01 am


Return to APL Chat

Who is online

Users browsing this forum: No registered users and 1 guest