Roger & Henry - Thank you for the explanations

I had a feeling that the arrays were structurally different but I
couldn't figure out how to tell.

I also narrowed it down to my use of cut. I will study that to
understand further

These were the ways I tried to look before

]a=:('a';'bcd')

┌─┬───┐
│a│bcd│
└─┴───┘

]b=:(' ' cut 'a bcd')

┌─┬───┐
│a│bcd│
└─┴───┘

$ a
2

$ b
2

Other clues that they were different

   $ each a

┌┬─┐
││3│
└┴─┘

$ each b

┌─┬─┐
│1│3│
└─┴─┘

I guess this would be the ultimate test -- the binary representation


* (manually removed the last one from the first column that was filled)

   (<(19 $ (3!:3 a))),.<(3!:3 b)
┌────────┬────────┐
│e1000000│e1000000│
│20000000│20000000│
│02000000│02000000│
│01000000│01000000│
│02000000│02000000│
│1c000000│1c000000│
│30000000│34000000│
│e1000000│e1000000│
│02000000│02000000│
│01000000│01000000│
│00000000│01000000│
│61000000│01000000│
│e1000000│61000000│
│02000000│e1000000│
│03000000│02000000│
│01000000│03000000│
│03000000│01000000│
│62636400│03000000│
│              │62636400│
└────────┴────────┘

Is there an easier way to visualize or identify the difference?

words also creates a 1 rank boxed string and can't be compared with <'a'

 (<'a') i. (;: 'a b c a')
1 1 1 1

Henry's suggestion works:

(<,'a') i. (;: 'a b c a')
0 1 1 0
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to