plus =: +
   $ 5 plus"1 (0 1 $' ')
0

This works correcly too, so I guess integrated rank support
in + is implicated.

Henry Rich 

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of Henry Rich
> Sent: Tuesday, June 27, 2006 2:56 PM
> To: 'Beta forum'
> Subject: [Jbeta] Incorrect result shape from 5 +"1 (0 1 $' ')
> 
> The rules are not made explicit for what happens when a
> verb fails when applied to a fill cell, but I have deduced
> by experiment that the interpreter behaves as if the
> failing result were a scalar numeric.  Thus:
> 
>    plus =: 4 : 'x + y'"0
>    $ 5 plus"1 (0 1 $' ')
> 0
> 
> Correct: 5 +"1 (1 $ ' ') failed, so ($0) was used as the
> result shape from the fill-cell, and that was extended with
> the frame (,0) to give a final result shape of ,0 .
> 
>    $ 5 +"1 (0 1 $' ')
> 0 1
> 
> Incorrect: should be the same result as above, but apparently
> special code for the + verb did not take into account the
> subtleties of fill-cell processing and assigned the result
> to have the same shape as the array operand.
> 
> Henry Rich
> 
> ----------------------------------------------------------------------
> 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