[Date Prev][Date Next][Subject Prev][Subject Next][
Date Index][
Subject Index]
Re: another elementary question
- Subject: Re: another elementary question
- From: Carl Distefano CLDistefano@xxxxxxxx
- Date: Fri, 27 Nov 1998 22:58:17 +0000
Reply to note from Eric Van Tassel <101233.342@xxxxxxxx> Fri, 27
Nov 1998 11:49:24 -0500
-> When I want to do something similar, I insert ernv
-> filename just before sad filename Won't that do it?
Sure, but why use two commands where one will do?
-> More generally, you can always disable those requests for
-> confirmation by inserting es 1 (where <..> = a
-> function) and then es 0 afterwards
Not always. As one of many possible examples, ES 1 won't suppress the
confirmation request when a COPY command is about to overwrite an
existing file. You need COPY/NV.
-> My XPL routines are littered with those strings -- in fact, I
-> tend to insert "es 1" near the start of a program and "es 0"
-> near the end.
In Xy4|XyWin you can omit the concluding BX (es 0) in XPL programs; ES
is turned off automatically when the program ends. Note, however,
that this does NOT apply to the keyboard file. If you start an
assignment with nn=BX(,e,s, ,1,),... a concluding BX(,e,s, ,0,) is
required. Otherwise, error suppression stays on, with often
perplexing results.
Turning on error suppression at the beginning of a program is standard
operating procedure, but there are pitfalls. ES 1 masks not only
benign, expected, *necessary* errors (like the one that gets you out
of an endless loop (e.g., BX se /foo/Q2 >...), but
also the mischief-makers -- the ones that slow down programs and make
them crash-prone. That's why ES 1 should be the last command added to
a program, after all the debugging is done.
--------------
Carl Distefano
CLDistefano@xxxxxxxx
http://users.datarealm.com/xywwweb/