Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!sdd.hp.com!hplabs!hpfcso!rrd From: rrd@hpfcso.FC.HP.COM (Ray Depew) Newsgroups: comp.sys.handhelds Subject: Re: specifying paths w/variables & progs Message-ID: <7360103@hpfcso.FC.HP.COM> Date: 22 Apr 91 16:37:00 GMT References: <231b3618.670790994@fergvax> Organization: Hewlett-Packard, Fort Collins, CO, USA Lines: 22 > 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.) I think that assigning variable names such as "HOME" ( or "CLVAR" ) falls under the heading of "stupid things a user should not do". If the user avoids using "HOME" as a variable name, then the { HOME nextdir } idea should work fine. Of course, I know that Eric would never do anything like this, and he was just proposing a hypothetical situation .... Regards Ray Depew HP ICBD -- IC's By Decree rrd@hpfitst1.hp.com