After the first box, J will enter into input mode, subsequent
sentences will not be executed until the closing ).

The front-end knows when input mode occurs, but this is not
exposed.

Ср, 08 фев 2017, jprogramming написал(а):
> seems promising,
> 
> Bill's approach would be useful for tasks such as an alternative to ctrl-R 
> that runs the enclosing top level line (can execute current definition 
> without moving cursor to top of definition)
> 
> Something else that I want though, is to run a script "one line at a time" 
> with the purpose of modifying (preprocessing) just top level definitions.
> 
> One way to do that would be to process a line, and then execute ctrl-return 
> in jqt, but that function is not exposed in qt.ijs
> 
> 
> is there a way to execute these lines? (one box at a time?)
> 
> 
> <;._1 '|a =: 3 : 0|+: y|)|2 + 2'
> 
> 
> 
> ----- Original Message -----
> From: Devon McCormick <[email protected]>
> To: J-programming forum <[email protected]>
> Sent: Wednesday, February 8, 2017 12:40 AM
> Subject: Re: [Jprogramming] in script file, how to tell if line is top level?
> 
> You could check the stack, i.e.
> 
>   #13!:18 ''
> 0
> 
> 3 : 0 ''
> #13!:18]y
> )
> 1
> 
> 
> 
> On Wed, Feb 8, 2017 at 12:13 AM, 'Pascal Jasmin' via Programming <
> [email protected]> wrote:
> 
> > in 4 line script,
> >
> > 2+2
> > a =: 3 : 0
> > nested definition line
> >
> > )
> >
> > the first 2 lines are "top level", but the last 2 are nested.
> >
> > is there any undocumented foreign that will return this status?  How does
> > the console know that it is in " : 0 " mode?
> > ----------------------------------------------------------------------
> > For information about J forums see http://www.jsoftware.com/forums.htm
> 
> 
> 
> 
> -- 
> 
> Devon McCormick, CFA
> 
> Quantitative Consultant
> 
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm

-- 
regards,
====================================================
GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
gpg --keyserver subkeys.pgp.net --armor --export 4434BAB3
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to