Here <@(...) has a fork so

   <@(_4: {.!.'0' ":)    b. 0
_ _ _
   <@(_4: {.!.'0' ":)"0  b. 0    NB. needs fixing with "0
0 0 0

Otherwise 
   <@(_4: {.!.'0' ":) i.10
+----+
| 8 9|
+----+

Another way is to use "each" or "every":

   pad=: {.!.'0' ":
   
   _3 pad each 1 10 100
+---+---+---+
|001|010|100|
+---+---+---+

   10 {.!.'.' every ;:'a one three'
a.........
one.......
three.....


--- On Tue, 7/1/08, Alex Rufon <[EMAIL PROTECTED]> wrote:

There's that rank 0 again!

I know that its discussed in the books but can anybody give a simplistic
explanation on why and when to use rank 0? I only use rank 1 and its
most likely I misunderstand it. I only use rank 1 when I try to apply a
verb on the column level of a two dimension matrix. I assume (from what
I've read so far) that rank zero is the rows of a two dimension matrix
and is assumed that its there and is omitted.

So why rank 0 again?

Thanks.

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: Saturday, June 28, 2008 5:37 AM
To: [email protected]
Subject: Re: [Jprogramming] Formatting then Boxing a vector

>I know I can do it this way:
>   < 'r<0>2.0' (8!:2) 6

As a retarted J4.05 user lacking 8!:2 I'd do this:

   <@(_4: {.!.'0' ":)"0  i. 10
+----+----+----+----+----+----+----+----+----+----+
|0000|0001|0002|0003|0004|0005|0006|0007|0008|0009|
+----+----+----+----+----+----+----+----+----+----+



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

Reply via email to