On 2020-06-29 21:26, HH PackRat wrote:
...
This is "a2":
┌─┬─┬─┬─┬
│1 │ 1│1│ 0│ . . .
└─┴─┴─┴─┴

a3=. > a2

The following SHOULD be "a3" (as far as I know):
  1  1  1  0 . . .

but "a3" ends up like this:
  1
  1
  1
  0
 . . .

And if I transpose this "a3", I end up with this:
  1110 . . .


Small "live" examples (not a script) work fine:

]a2=. 1;1;1;0;0;0

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

]a3=. > a2

  1 1 1 0 0 0


   ]a=: ' '&, each <"0 '111000'
┌──┬──┬──┬──┬──┬──┐
│ 1│ 1│ 1│ 0│ 0│ 0│
└──┴──┴──┴──┴──┴──┘
   >a
 1
 1
 1
 0
 0
 0
   |:a
┌──┬──┬──┬──┬──┬──┐
│ 1│ 1│ 1│ 0│ 0│ 0│
└──┴──┴──┴──┴──┴──┘
   |:>a

111000
   datatype each a
┌───────┬───────┬───────┬───────┬───────┬───────┐
│literal│literal│literal│literal│literal│literal│
└───────┴───────┴───────┴───────┴───────┴───────┘

The problem looks to be that you have strings where you expect
to have numbers. A quick solution then is to convert your
strings to numbers.

   > 0&". each a
1 1 1 0 0 0
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to