f=:('||'&,"_ 1)&:>
g=:,.&f
h=:'||' ,"1 _~ g
a h b
||abc ||xyzxyz ||
||def ||xyz ||
||g ||xyz ||
||hijkl||xyzxyz ||
||mn ||xyzxyzxyz||
Paul Gauthier
APL Software Developer - Senior
[EMAIL PROTECTED]
Phone: 312-739-3467
Fax: 312-739-3496
CheckFree. The Company that Powers Payment on the WebSM.
http://www.checkfree.com/paybillsonline
"June Kim" <[EMAIL PROTECTED]>
Sent by: [EMAIL PROTECTED]
03/23/2006 11:09 AM
Please respond to
Programming forum <[email protected]>
To
"Programming forum" <[email protected]>
cc
Subject
Re: [Jprogramming] Simple way of making a table?
Or more generally,
vbar a ,. b NB. vbar's y values can be any size of 2d table
||abc ||xyzxyz ||
||def ||xyz ||
||g ||xyz ||
||hijkl||xyzxyz ||
||mn ||xyzxyzxyz||
It was relatively easy to work on "a bar b" but this one is more
difficult. Could anyone help out?
On 3/24/06, June Kim <[EMAIL PROTECTED]> wrote:
> Sorry for any confusion I made.
>
> The result's separator between cells should be two vertical bars, ie.
'||'
>
> So,
> a,&(]&.:>)b
> +-----+---------+
> |abc |xyzxyz |
> |def |xyz |
> |g |xyz |
> |hijkl|xyzxyz |
> |mn |xyzxyzxyz|
> +-----+---------+
>
> isn't what I'm looking for. It should be instead:
>
> a verticalbar b
> ||abc ||xyzxyz ||
> ||def ||xyz ||
> ||g ||xyz ||
> ||hijkl||xyzxyz ||
> ||mn ||xyzxyzxyz||
>
>
> Suppose you are to copy and paste the result into the J wiki and also
> let it stay easy to modify when in edit mode.
>
>
>
> On 3/24/06, Miller, Raul D <[EMAIL PROTECTED]> wrote:
> > p j wrote:
> > > 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,
> > ...
> >
> > I don't completely understand what you are asking for, even
> > with the visual example.
> >
> > Could you comment on how this differs from what you want?
> >
> > a,&(]&.:>)b
> >
> > Thanks,
> >
> > --
> > Raul
> > ----------------------------------------------------------------------
> > For information about J forums see http://www.jsoftware.com/forums.htm
> >
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm