Ian's idea is even better: don't.

On Tue, Aug 31, 2021 at 11:05 PM Ian Clark <[email protected]> wrote:

> Ruda wrote
> > if I load a (longer) script, I sometimes want to ignore a part of it
>
> I take Ruda's use of "sometimes" to mean he wants the proposed feature to
> be switchable.
>
> To anyone wanting to dabble with such a feature, I have a word of advice.
> Don't.
> If there's part of your script you want to omit, it belongs in a separate
> script.
> Currently, if you load a J script, it either loads completely or signals an
> error. Relax this axiom and you open Pandora's box.
>
> I once implemented a script-truncation feature, along the lines of
>    0!:100 < hack fread 'myscript.ijs'
> which is very roughly Mike's solution.
> I was so taken with it I started using it routinely. Bugs were slow to
> appear, but when they did they were destructive and inopportune, usually
> unexpected "value errors". And I'd robbed 4!:3 and 4!:4 of their power.
>
> I don't want to discuss here what can go wrong. But if anyone can think
> back to punched-card days, IBM gave us these brightly-colored
> slash-asterisk cards (if memory serves), to insert in your card deck for
> Ruda's purpose. They proved as mischievous as radium toothpaste.
>
> Don't say I didn't warn you.
>
> On Tue, 31 Aug 2021 at 13:27, 'Rudolf Sykora' via Programming <
> [email protected]> wrote:
>
> > Dear list,
> >
> >
> > if I load a (longer) script, I sometimes want to ignore a part of it
> > beyond a certain line. Is there a way to achieve that gracefully? (I
> > sometimes just add something syntactically wrong to stop there, on an
> > error).
> >
> >
> > Thank you.
> > Ruda
> > ----------------------------------------------------------------------
> > For information about J forums see http://www.jsoftware.com/forums.htm
> >
> ----------------------------------------------------------------------
> 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

Reply via email to