Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watnot!watmath!clyde!cbatt!ucbvax!MITRE.ARPA!art From: art@MITRE.ARPA.UUCP Newsgroups: mod.computers.vax Subject: Re: How to tell if global symbol is defined? Message-ID: <8702201657.AA07479@mitre.ARPA> Date: Fri, 20-Feb-87 11:57:45 EST Article-I.D.: mitre.8702201657.AA07479 Posted: Fri Feb 20 11:57:45 1987 Date-Received: Sat, 21-Feb-87 10:46:49 EST References: <12280361098.21.BEC.SHAPIN@USC-ECL.ARPA> Sender: daemon@ucbvax.BERKELEY.EDU Organization: The MITRE Corp., Washington, D.C. Lines: 35 Approved: info-vax@sri-kl.arpa It appears that there is no easy way to solve your problem. Two possible solutions (SPELL THAT KLUDGES) are: 1) $ASSIGN TEMP.LIS SYS$OUTPUT $SHOW SYMBOL/LOCAL B $SHOW SYMBOL/GLOBAL B $DEASSIGN SYS$OUTPUT now read the temp.lis file. If globally defined will find an entry with "==". If locally defined the entry will have "=". 2) A more direct apporach is to use the ON WARNING to catch a failure. $ON WARNING THEN $GOTO UNDEFINED $C=A $ON WARNING THEN $GOTO GLOBAL $DELETE/SYMBOL/LOCAL A $WRITE SYS$OUTPUT "LOCAL SYMBOL" $A=C !RESTORE LOCAL SYMBOL $.... $GLOBAL: WRITE SYS$OUTPUT "GLOBAL SYMBOL" $.... $UNDEFINED: WRITE SYS$OUTPUT "UNDEFINDED SYMBOL" $... * *---Art * *Arthur T. McClinton Jr. ARPA: ART@MITRE.ARPA *Mitre Corporation MS-Z305 Phone: 703-883-6356 *1820 Dolley Madison Blvd Internal Mitre: ART@MWVMS or M10319@MWVM *McLean, Va. 22102 DECUS DCS: MCCLINTON * =-=- This note is in response to yours which follows -=-= How can I tell from within a command procedure whether or not a symbol has been defined in the proces global symbol table? -------