Don Guinn wrote:
>   (2 2$;:'abc de fg h'),;2#<,:;:'ww xxxx'
>   (2 2$;:'abc de fg h'),;1#<,:;:'ww xxxx'
>   (2 2$;:'abc de fg h'),;0#<,:;:'ww xxxx'
>Why is there a third item which is empty in the last case? Am I
>misunderstanding something about append?

Take a look at the shapes of your three right sides, i.e.
        ;2#<,:;:'ww xxxx'
        ;1#<,:;:'ww xxxx'
        ;0#<,:;:'ww xxxx'

and compare this with the (much simpler) right sides
        2 # ,: ;: 'ww xxxx'
        1 # ,: ;: 'ww xxxx'
        0 # ,: ;: 'ww xxxx'

which all append nicely.

Returning to your original problem:  I consider the design of
1!:0 to be botched.  I'd prefer it to return an empty 0 6 matrix
in the case of non-matches.  Also, it should work on the
root directory as it does on any other directory.  I always
have to code around these special cases.  (The standard
'dir' wrapper doesn't extend nicely to empty matches, either.)

                                                        Martin
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to