I think you want: (rows,2)$1 2 3 4 5 6 7 8 Grammatically speaking, a list of space separated numbers is a single "word" - if you put quotes around them, they would still be a single "word" but you would have a sequence of characters rather than a sequence of numbers.
Meanwhile, when you use a name, that's a separate word. Anyways, I'm guessing that you want rows 2 to act like 4 2, but the way to accomplish that is to form the two separate values into a single list. (Also, you'll want that to happen before reshaping your list of eight numbers, and of course that's what the parenthesis are for.) Finally, note that you probably wanted to post this in the programming forum. General is more for infrastructure topics (though, granted, we could think of this as a support request). Thanks, -- Raul On Wed, Mar 25, 2015 at 5:17 AM, Maxwell Peterson <[email protected]> wrote: > Hi all, > > I'm having a problem where this works: > 4 2 $ 1 2 3 4 5 6 7 8 > but this does not: > rows =: 4 > rows 2 $ 1 2 3 4 5 6 7 8 > > In the latter case, I get a syntax error. > > Is this expected behavior? If not, could you let me know what I'm doing > wrong? > > Thanks, > -- > Maxwell Peterson > Department of Genome Sciences > University of Washington, Seattle > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
