Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!think.com!news!mjab From: mjab@nanna.think.com (Michael J. A. Berry) Newsgroups: comp.lang.apl Subject: Re: Some General Questions about J Message-ID: Date: 28 Feb 91 21:27:04 GMT References: <1991Feb23.234505.5960@csi.uottawa.ca> <1991Feb26.162714.28837@csrd.uiuc.edu> Sender: news@Think.COM Organization: Thinking Machines Corporation, Cambridge MA, USA Lines: 33 In-Reply-To: jaxon@sp27.csrd.uiuc.edu's message of 26 Feb 91 16:27:14 GMT In article <1991Feb26.162714.28837@csrd.uiuc.edu> jaxon@sp27.csrd.uiuc.edu (Greg P. Jaxon) writes: . . . I was sure I understood the rank operator until I read Mike Berry's reply. What I can't understand now is how the summation chose the `middle' axis. Am I right that there are 2 `rank-2 cells' in EXPENDITURES, and they are 3x6 arrays? If so shouldn't summing them yield a 3x6 result? Or is J's rank operator asking sum to produce a rank-2 result?, in which case I want to know how it picked the axis to reduce. I'm just guessing here, but has +/ been changed to work by default on the leading axis of its argument? Applying +/[#IO] to the rank-2 cells of EXPENDITURES would give 2 6-element results. Yes, that is what happened. In J, *everything* favors the first axis. / does what slash-bar used to do, comma does what comma-bar used to do. This (I assume) is to make the rank operator more convenient to use. Regards, Greg Jaxon Univ. of Ill. Center for Supercomputing R&D jaxon@csrd.uiuc.edu -Michael -- ============================================== Michael J. A. Berry Internet: mjab@think.com uucp: {harvard, uunet}!think!mjab telephone: (617) 234-2056 FAX: (617) 234-4444 ==============================================