Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!elroy.jpl.nasa.gov!jato!kalessin!sam From: sam@kalessin.jpl.nasa.gov (Sam Sirlin) Newsgroups: comp.lang.apl Subject: Re: Questions about J. Message-ID: <1991Jan9.171347.19535@jato.jpl.nasa.gov> Date: 9 Jan 91 17:13:47 GMT References: <15160009@hpdmd48.boi.hp.com> Sender: news@jato.jpl.nasa.gov Reply-To: sam@kalessin.jpl.nasa.gov (Sam Sirlin) Organization: Jet Propulsion Laboratory, Pasadena, CA Lines: 35 Nntp-Posting-Host: kalessin.jpl.nasa.gov In article <15160009@hpdmd48.boi.hp.com>, rrr@hpdmd48.boi.hp.com (Rudi Rynders) writes: |> OK, how DOES one catenate two m-rowed arrays in the "horizontal" direction in J? |> A pretty basic question , I admit. But why is it so hard to find? |> |> Anyone care to explain in detail the "OVER" and "BY" constructs?. |> |> Rudi Rynders (rrr@ hpdmd48.boi.hp.com) To catenate two arrays on their last axis, use under: a ,&.|: b This takes the transpose to start, catenates, then transposes the result (I think). It does seem to work at least for matrices. I suspect that with dyadic transpose one could catenate about arbitrary axes, albeit rather more cryptically than in traditional APL. And people used to say that APL was a write only language! As to over and by, my list (2.7) doesn't have those names, so I would have to consult other documentation. Did you send away to J for this? At least it gives mathematical details, which means you can eventually (using tests) figure them out. Consider it a puzzle. I've not been able to find a way to do the equivalent of reassignment: A[I] .is X in J. Is this really impossible? Doesn't this make it hard to do some things that FORTRASH even does easily (such as setting up similar arrays)? Or maybee I should compare to Matlab, the other ascii APL derivative. -- Sam Sirlin Jet Propulsion Laboratory sam@kalessin.jpl.nasa.gov