Alex Gian wrote:
> (,.&.":) 12 34 56
> 1
> 2
> 0
> 3
> 4
Yeah, this feature of ": is what I was worried about when I wrote:
> (... why it "acts funny" when used on a non-scalar array).
As Bill said, ": has unbound rank. What that means is, when you give it
something to format, it'll format the entire thing as one big picture,
whitespace and all (hence the extraneous 0s you found).
If you only want ": to work on one thing at a time, you've got to give it a
narrower perspective. This is why this thread is full of suggestions ending
in "0 (or a variation on the theme, like &> or &.>). All these adverbs
(things that modify verbs) will narrow the perspective of format, so it can
only see a single number at a time.
Try
(,.&.":" 0) 12 34 56
(,.&.":& >) 12 34 56
(,.&.":&.>) 12 34 56
-Dan
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm