I wrote:
> ["list" will] respect the items as present in the input data.
I just recognize that this holds just for character data, but is
not the case for numeric data. For example:
30 list i. 30 3
0 1 2 3 4 5 6 7 8
9 10 11 12 13 14 15 16 17
18 19 20 21 22 23 24 25 26
27 28 29 30 31 32 33 34 35
36 37 38 39 40 41 42 43 44
45 46 47 48 49 50 51 52 53
54 55 56 57 58 59 60 61 62
63 64 65 66 67 68 69 70 71
72 73 74 75 76 77 78 79 80
81 82 83 84 85 86 87 88 89
This doesn't keep items, either, and I just stopped wondering about
even higher ranks. All in all, it is not clear to me how "list"
should behave in the general case and I cannot make a sane proposal
at this moment. Still, I would consider it prudent these case
were treated the same:
30 list 30 $ s: ',one,two,and three'
30 list 30 $ <;._1 ',one,two,and three'
This is "list"s documentation:
list data formatted in columns
syntax: {width} list data
accepts data as one of:
boxed list
character vector, delimited by CR, LF or CRLF; or by ' '
character matrix
formats in given width, default screenwidth
I am unable to reconcile the following behaviour with this definition:
NB. boxed character lists get aligned as such:
30 list 30 $ 'abc' ; 'de' ; 'fgh'
abc de fgh abc de fgh abc
de fgh abc de fgh abc de
fgh abc de fgh abc de fgh
abc de fgh abc de fgh abc
de fgh
NB. boxed number lists won't:
30 list 30 $ 1 2 3; 4 5; 7 8 9
1 2 3 4 5 0 7 8 9 1 2 3 4 5 0
7 8 9 1 2 3 4 5 0 7 8 9 1 2 3
4 5 0 7 8 9 1 2 3 4 5 0 7 8 9
1 2 3 4 5 0 7 8 9 1 2 3 4 5 0
7 8 9 1 2 3 4 5 0 7 8 9 1 2 3
4 5 0 7 8 9 1 2 3 4 5 0 7 8 9
Martin
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm