[Jprogramming] unexpected behaviour with rank of x:
Brian Schott
schott.brian at gmail.com
Thu Nov 1 19:02:16 UTC 2018
Bob,
"0 behaves like "0 0 on dyadic verbs.
On Thu, Nov 1, 2018 at 2:48 PM 'robert therriault' via Programming <
programming at jsoftware.com> wrote:
> Any ideas on why I am getting this result? I am running the current
> version of j807 but this seems to be the same all the way back to J701,
> which makes me think that there is something that I am missing in the way
> that rank is applied.
>> a
> 0 1 2
> 3 4 5
> 1 2 x:"0 _ a NB. this is expected
> 0 1 2
> 3 4 5
> 0 0 0
>> 0 0 0
> 0 0 0
> 0 0 0
>>> 0 1 0
> 1 1 0
> 2 1 0
>> 3 1 0
> 4 1 0
> 5 1 0
> 1 2 x:"0 a NB. this is was unexpected. Shouldn't it be the same as
> the result of 1 2 x:"0 _ a
> 0 0
> 1 0
> 2 0
>> 3 1
> 4 1
> 5 1
> 2 x:"0 a NB. the constituent parts behave as expected with rank 0
> 0 1
> 1 1
> 2 1
>> 3 1
> 4 1
> 5 1
> 1 x:"0 a
> 0 1 2
> 3 4 5
>> Cheers, bob
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
--
(B=) <-----my sig
Brian Schott
More information about the Programming
mailing list