Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!usc!hacgate!lori From: lori@hacgate.scg.hac.com (Lori Barfield) Newsgroups: comp.sys.apollo Subject: Re: go to old directory == 'back' ?? Summary: global vars Keywords: Aegis shell levels Message-ID: <4202@hacgate.scg.hac.com> Date: 28 Jun 89 23:52:02 GMT References: <678@idacom.UUCP> Organization: Hughes Aircraft Company, El Segundo CA Lines: 31 In article <678@idacom.UUCP>, danny@idacom.UUCP (Danny Wilson) writes: > > However, because the variable 'old' gets set at a lower shell level it > is undefined within program 'back'. Has anyone got a solution for > a (seemingly) easy problem like this? You can export the variable in ~user_data/sh/startup. Try a script with x:='hello'; export x; then at the prompt do a lvar. See what I mean? (I'm writing off the top of my head now, so if the syntax here is goofy send me email. I just thought you waited long enough for such a simple answer.) You may also want to know about a command called "source". If you invoke an Aegis script with source, it's the same as including that code in the calling file: Variable declarations and settings will belong to the calling script. (syntax: source FILENAME instead of just FILENAME to invoke) The third option is to use DM buffers. Don't use the unnamed buffer; users depend on that one if you use any of the std_keys key definitions files without modifications. I won't go into details here; it's easy if you are familiar with DM scripting. (If you aren't and you decide to use this approach, you are welcome to email me.) ...lori ARPA: lori@hacgate.scg.hac.com