Grouping of adjacent numbers is something that happens during word formation: it's embedded into the sequential machine ;: (the dictionary gives a rather opaque description of this). You should train yourself to do the same, so that you parse "1!:1 1" as ;: '1!:1 1' ┌─┬──┬───┐ │1│!:│1 1│ └─┴──┴───┘ Then, when you see that your sentence does not have the order of execution you intended, add parenthesis or the slightly more obfuscated identity function to accomplish the task. ;: '(1!:1) 1' ┌─┬─┬──┬─┬─┬─┐ │(│1│!:│1│)│1│ └─┴─┴──┴─┴─┴─┘ ;: '1!:1 ]1' ┌─┬──┬─┬─┬─┐ │1│!:│1│]│1│ └─┴──┴─┴─┴─┘
Marshall On Fri, Dec 30, 2011 at 4:12 AM, PackRat <pack...@anet.com> wrote: > bill lam wrote: > > You may need to dlimit argument to 1!:2 ,eg > > y 1!:2[2 or y 1!:2 ]2 or y 1!:2(2) or y (1!:2) 2 > > This worked--thanks! Now if only 1!:1 1 would work in scripts... > > > For what is worth, C, similar to J, does not have any i/o instructions > in its > > core language. All i/o are supposed to be done by external i/o library. > > I've no problem with including libraries as sources of additional > commands. (I consider them as part of the extensibility of the > language, and I do includes all the time with most of the J scripts I > write.) Which J library contains the basic keyboard input/screen > output routines I requested? > > > You can try the ncurses addons for text mode interface. > > I was completely unable to find anything in J602 containing "ncurses" > within the filename or within the file itself (except a single > reference in a file of changes between J601 and J602 referring to > Linux/Mac). Then I realized that I hadn't checked in a while for addon > updates. Sure enough...there it was! Now to figure out how to use > it... > > > Harvey > > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm