1 ] . (p:@]) 1
3

Is that better?

Henry Rich

On 4/27/2012 11:57 AM, Raul Miller wrote:
> This bug appears in both j602 and j701 (in both 32 bit and 64 bit
> versions).  I have only tested windows implementations but this result
> should be platform independent:
>
>     1 (]@(p:@]"_ _) -: ] . p:@]) 1
> 0
>
> According to http://www.jsoftware.com/help/dictionary/d300.htm this
> result should be true.
>
> In other words:
>
>
>     1 ]@(p:@]"_) 1
> 3
>
> (good)
>
>
>     1 ] . p:@] 1
> 1
>
> (bad)
>
>
> A workaround is to not use dyadic verbs generated by the . primitive
> but instead use
>
> dot=:2 :0
>     u .v
> :
>     u@(v"(0 1 _ + v b. 0))
> )
>
> FYI,
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to