As http://www.jsoftware.com/help/primer/agreement.htm states in the last
paragraph: "(...) one frame must be a prefix of the other (...)"

The frames of 

   '',"0 [1 2 3

are 0 and 3, since 0=$'' and 3=$1 2 3 . Since 0 is not a prefix of 3 you get
a length error.

See also http://www.jsoftware.com/jwiki/Essays/A%20Fine%20Line

Perhaps now you can work out the other examples yourself. Read also
http://www.jsoftware.com/help/primer/result_shape.htm 


R.E. Boss



> -----Oorspronkelijk bericht-----
> Van: [email protected] [mailto:programming-
> [email protected]] Namens Graham Parkhouse
> Verzonden: zaterdag 28 augustus 2010 12:32
> Aan: [email protected]
> Onderwerp: [Jprogramming] Rank zero append (,"0)
> 
> 
>    '',1 2 3
> 1 2 3
>    NB. OK
>    '',"0 [1 2 3
> |length error
> |   ''    ,"0[1 2 3
>    NB. Is this because there are NO atoms in LH argument?
>    NB. I would have preferred to have seen 1 2 3
>    1 2 3,"0/ 4 5 6
> 1 4
> 1 5
> 1 6
> 
> 2 4
> 2 5
> 2 6
> 
> 3 4
> 3 5
> 3 6
>    NB. OK
>    '',"0/ 4 5 6
> 
>    NB. I would have preferred to have seen 4 5 6
>    NB. Oddly:
>    '',"1 0/ 4 5 6
> 4
> 5
> 6
>    NB. I'm struggling to understand the rules.
> 
> Regards
> 
> Graham
> 
> ----------------------------------------------------------------------
> 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