f11 will probably only work in script editor. (probably works in fresh console session though) cursor needs to be above the )
in terms of code inside a multiline definition, no "escaping"/reformatting is done. though you can do ctrl-r or F11 on the top line of: code =: jpp each cutLF 0 : 0 smoutput: hello 1 smoutput: hello 2 ) or f11 anywhere inside this (to get verb) code =: (jpp each cutLF 0 : 0) 3.. smoutput: hello 1 smoutput: hello 2 ) an issue with the userkeys is that you have to restart for them to take effect... The F11 key calls different versions(2 appended) of functions than F12 key, in case you didn't notice and typed rather than copypaste. ________________________________ From: Joe Bogner <[email protected]> To: [email protected] Sent: Thursday, March 23, 2017 9:10 PM Subject: Re: [Jprogramming] introducing j plus plus I can't seem to get a simple multi-line example to work even with f11 Take this example: code =: 0 : 0 smoutput: hello 1 smoutput: hello 2 ) Should that be defined as a verb? Where do I hit f11 ... in the repl or in the script editor? defined as this: code =: 3 : 0 smoutput: hello 1 smoutput: hello 2 ) When I hit f11 I get this: |spelling error | smoutput: hello 1 | ^ | code=:3 :0 |[-3] On Thu, Mar 23, 2017 at 4:08 PM, 'Pascal Jasmin' via Programming < [email protected]> wrote: > The F11 suggested keybinding (Edit|configure|User keys) will do multiline, > and you don't need to be at the top of the definition when you invoke it. > > > F11;0;jpp section;DoWithMacro2@findline2_jpp_ '' > > > > > ________________________________ > From: Joe Bogner <[email protected]> > To: [email protected] > Sent: Thursday, March 23, 2017 2:38 PM > Subject: Re: [Jprogramming] introducing j plus plus > > > > Pascal, this is neat. > > Some trivial examples seem to work fine (as in the documentation) > > (6!:2): 1 + 1 <f12> > > smoutput: hello <f12> > > smoutput: hello 'bob' > > smoutput 'hello ''bob''' > > hello 'bob' > > > It looks like I can run a string too: > > DoWithMacro jpp 'smoutput: hello' > > smoutput 'hello' > > hello > > > > Is it possible to run a code block in a multi-line string? I couldn't > figure that out from the README.md > > code =: 0 : 0 > smoutput: hello 1 > smoutput: hello 2 > ) > > DoWithMacro jpp code > smoutput 'hello 1 > |open quote > | smoutput 'hello 1 > | ^ > |[-0] > > > jpp code > smoutput 'hello 1 > smoutput: ( hello 2 > )' > > Thanks > > > > On Fri, Mar 17, 2017 at 9:25 PM, 'Pascal Jasmin' via Programming < > [email protected]> wrote: > > > A preparser for J that autocloses parentheses, and makes embedding quotes > > easier. Also has user-defined primitives. > > > > > > https://github.com/Pascal-J/jpp > > > > as examples, > > > > 4 timespacex: +/ i.1000 > > > > is equivalent to > > > > 4 timespacex '+/ i.1000' > > > > the suggested F11 macro is pretty neat. Runs a section of code in a > > file. Unlike ctrl-R, you don't need to be at the top level line in order > > to run the multiline group that encloses the current line. > > ---------------------------------------------------------------------- > > For information about J forums see http://www.jsoftware.com/forums.htm > > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
