[Jprogramming] i.0 vs i. 0 0
Pascal Jasmin
godspiral2000 at yahoo.ca
Tue Sep 26 02:49:52 HKT 2006
wiki page here... hopefully accurate
http://www.jsoftware.com/jwiki/PascalJasmin/i_dot_0_and_i_dot_0_0?highlight=%28PascalJasmin%2F%29
--- Henry Rich <HenryHRich at nc.rr.com> wrote:
> 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: programming-bounces at jsoftware.com
> > [mailto:programming-bounces at jsoftware.com] 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
>
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
More information about the Programming
mailing list