Here's some information; why don't you start a Wiki page?

i. 0   is   0$0

i. 0 0    is  0 0 $ 0

The display of a rank-2 array is each line, with LF
appended to the end of each line.

So, for 0 0 $ 0   you get no lines, no LF.

for 0 $ 0  you get one (empty) line, ended by LF


+/ applied to an empty list produces an identity
item: an item made up of identity elements.

+/ 0 $ 0    the item is a scalar, there are none of them,
  so the result is the identity scalar (shape '')

   $ +/ i. 0


+/ 0 0 $ 0   the item is a 0-length list, there are none of
  them, so the result is an identity item: a 0-length list
  (values are 0 but there are no values):

   $ +/ i. 0 0
0


Henry Rich


> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of Pascal Jasmin
> Sent: Monday, September 25, 2006 12:33 PM
> To: Programming forum
> Subject: [Jprogramming] i.0 vs i. 0 0
> 
> in the J console,
> i.0 will return a blank line, while i.0 0 returns
> nothing, and
> 
>    (i.0) -: i. 0 0
> 0
>    '' -: i.0
> 1
>    (i.0) ; i. 0 0
> ┌┬┐
> │││
> └┴┘
>    +/ each (i.0) ; i. 0 0
> ┌─┬┐
> │0││
> └─┴┘
> I don't really understand the difference between the 2
> values, and am surprised by the last result.
> I remember a scattering of references to each i.0 and
> i. 0 0, and think it should have its own index page. 
> is it as simple as i.0 is empty and i.0 0 is nil?
> 
> 
> Could you help list where each is used inside J, and
> when each version is more helpful (or gets you in less trouble?)
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around 
> http://mail.yahoo.com 
> ----------------------------------------------------------------------
> 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