Is this what you want?

  (>a);(>b)
+-----+---------+
|abc  |xyzxyz   |
|def  |xyz      |
|g    |xyz      |
|hijkl|xyzxyz   |
|mn   |xyzxyzxyz|
+-----+---------+

June Kim wrote:

Hello,

  a=.'abc';'def';'g';'hijkl';'mn'
  b=.'xyzxyz';'xyz';'xyz';'xyzxyz';'xyzxyzxyz'
  a,.b

You see the table. What I want instead is, something like,

||abc  ||xyzxyz   ||
||def  ||xyz      ||
||g    ||xyz      ||
||hijkl||xyzxyz   ||
||mn   ||xyzxyzxyz||

(Note that the vertical lines should all align along the columns when
displayed with fixed-width fonts)

Maybe something like "%10s" string formatting in C's printf and its
friends would be useful for these kinds of problems. (What I actually
did for this particular problem was string-fy the table result of ,.
and transforming the result into what I expect ; however, I'd love to
see more general and less quirky approaches).
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm



----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to