IF there are no anticipated errors in the script, then one can put an arbitrary sentence that will raise execution error such as 13!:8[3 at the point of stop loading, and load the script and ignore the error, 0!:0 ::0: foo
the side effect of the portion already loaded should still remain. On Thu, May 10, 2018, 6:55 AM Eric Iverson <[email protected]> wrote: > I second Martin's comments about being wary of another level of > meta-language for basic script load. > > There might be good arguments for custom loaders that handle things like > this and more. But let's not overload load! > > > On Wed, May 9, 2018 at 6:34 PM, <[email protected]> wrote: > > > Ian Clark wrote: > > > > > >Can I propose we agree to alter the stdlib verb: (load) to provide a way > > to > > >stop loading a given script? > > > > > > @@NB. stop loading at this line > > > > > >certainly does that, but generates an unwelcome "syntax error". This can > > >interfere with calling processes. > > > > I'd be wary of establishing a meta-language/notation controlling script > > loading. Enough tools exist to deal with your stop line, for example: > > > > 0!:101 ({.~ I.@('@@'&E.)) 1!:1 <'yourscript.ijs' > > 0!:101 [ 2!:0 'sed "/^@@/{s///;q}" yourscript.ijs' > > > > Martin > > ---------------------------------------------------------------------- > > 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
