From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,59f8b6abe0d46fee X-Google-Attributes: gid1164f8,public X-Google-ArrivalTime: 1994-10-24 00:06:46 PST Newsgroups: comp.sys.dec Path: bga.com!news.sprintlink.net!howland.reston.ans.net!news.moneng.mei.com!uwm.edu!lll-winken.llnl.gov!unixhub!slacvx.slac.stanford.edu!fairfield From: fairfield@slacvx.slac.stanford.edu Subject: Correction: Re: EDT and TPU... Message-ID: <1994Oct19.234909.1@slacvx.slac.stanford.edu> Sender: news@unixhub.SLAC.Stanford.EDU Organization: Stanford Linear Accelerator Center References: <3848hd$duv@hermes.ridgefield.sdr.slb.com> <1994Oct19.185046.1@slacvx.slac.stanford.edu> Date: Thu, 20 Oct 1994 07:49:09 GMT 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...