Vectors displaying as one column matrix
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 !
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 !
2 posts
• Page 1 of 1
Vectors displaying as one column matrix
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: 420
- Joined: Fri Oct 03, 2008 4:14 pm
Re: Vectors displaying as one column matrix
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:
On my Mac:
⎕sh'ls -d D*'
Desktop
Documents
Downloads
Dropbox
⊢⎕sh'ls -d D*'
┌───────┬─────────┬─────────┬───────┐
│Desktop│Documents│Downloads│Dropbox│
└───────┴─────────┴─────────┴───────┘
- JohnS|Dyalog
2 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group