Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!elroy.jpl.nasa.gov!decwrl!pa.dec.com!shlump.nac.dec.com!jareth.enet.dec.com!edp From: edp@jareth.enet.dec.com (Eric Postpischil (Always mount a scratch monkey.)) Newsgroups: comp.sys.handhelds Subject: Re: specifying paths w/variables & progs Keywords: path, hp48sx Message-ID: <22199@shlump.nac.dec.com> Date: 19 Apr 91 17:18:14 GMT References: <231b3618.670790994@fergvax> <1523@tau.sm.luth.se> <1617@fs1.ee.ubc.ca> Sender: newsdaemon@shlump.nac.dec.com Reply-To: edp@jareth.enet.dec.com (Eric Postpischil (Always mount a scratch monkey.)) Distribution: comp.sys.handhelds Organization: Digital Equipment Corporation Lines: 30 In article <1617@fs1.ee.ubc.ca>, jthornto@ee.ubc.ca (Johan Thornton) writes: >->2) If you just want to jumb to the directory BINP just key in: >-> { HOME BINP } EVAL >-> >->Morgan Lindqvist d89-mlt@sm.luth.se > > >This is not a bad idea. Not much overhead at all. But note that you >don't have to explicitly say HOME when switching to the BINP directory. >Since that subdirectory is in HOME, it's always in the path. That will not always work. There could be another BINP somewhere along the current path, in which case evaluating BINP will switch to that directly. It is necessary to start from HOME. Even this can fail if typed in, because local variables can have the same names as built-in commands. For example, type \<< 8 \-> HOME \<< HALT \>> \>>. Then press EVAL. If you type in { HOME } and press EVAL now, you will get 8 on the stack and will not be in the home directory. (If { HOME BINP } were entered into a program at a time when there were no HOME or BINP local variables active, it would be parsed as expected and would evaluate to the appropriate directory even if evaluated when local variables were active.) -- edp (Eric Postpischil) "Always mount a scratch monkey." edp@jareth.enet.dec.com