From: fairfield@slacvx.slac.stanford.edu
Subject: Correction: Re: EDT and TPU...
Date: Thu, 20 Oct 1994 07:49:09 GMT [thread overview]
Message-ID: <1994Oct19.234909.1@slacvx.slac.stanford.edu> (raw)
In-Reply-To: 1994Oct19.185046.1@slacvx.slac.stanford.edu
In article <1994Oct19.185046.1@slacvx.slac.stanford.edu>, I wrote:
[...]
> If you want an _ugly_ solution, do the following:
>
> ED*IT == "@dev:[dir]MY_EDIT %"
>
> where MY_EDIT.COM does _something_ like this:
The command file I posted would fail (semi-infinite looping) if
invoked via the symbol ED*IT because it didn't "protect" itself from
such a symbol in trying to invoke the DCL _verb_ EDIT. The command
file either needs a SET SYMBOL/SCOPE=(NOLOCAL,NOGLOBAL) at the top
(and some logic to restore the symbol scope before exit), or it
needs to locally define EDIT to the DCL verb, like so:
-------------------------------------------------------------------------------
$! P1 contains "%", so ignore it. Check P2 for an editor qualifier...
$
$ e_quals = ".A.AC.ACL.E.ED.EDT.F.FD.FDL.S.SU.SUM.TE.TEC.TECO.TP.TPU."
$ l_quals = F$Length (e_quals)
$
$ If P2.Nes.""
$ Then
$ qual = "." + F$Edit (F$Element (1, "/", P2), "COLLAPSE") + "."
$ If F$Locate (qual, e_quals) .Ge. l_quals ! Not found
$ Then
$ P2 = "/EDT " + P2
$ Endif
$ Endif
$
$ Define/User Sys$Input Sys$Command
$ Edit = "EDIT" ! protect against a symbol EDIT
$ Edit 'P2' 'P3' 'P4' 'P5' 'P6' 'P7' 'P8'
-------------------------------------------------------------------------------
-Ken
--
Dr. Kenneth H. Fairfield | Internet: Fairfield@Slac.Stanford.Edu
SLAC, P.O.Box 4349, MS 98 | DECnet: 45537::FAIRFIELD (45537=SLACVX)
Stanford, CA 94309 | Voice: (415) 926-2924 FAX: (415) 926-4335
----------------------------------------------------------------------------
These opinions are mine, not SLAC's, Stanford's, nor the DOE's...
next prev parent reply other threads:[~1994-10-20 7:49 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
1994-10-07 16:02 OSF/1 as EWS Login Host? Tim Llewellyn
1994-10-19 23:02 ` EDT and TPU John Lovell
1994-10-20 2:50 ` fairfield
1994-10-20 7:49 ` fairfield [this message]
1994-10-22 4:21 ` Jerry D. Ryan - Tech. Computations - (612) 733-3595 - jdryan@mmm.com
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox