Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!elroy.jpl.nasa.gov!ncar!gatech!purdue!mentor.cc.purdue.edu!ahernsd From: ahernsd@mentor.cc.purdue.edu (Dynastar) Newsgroups: comp.sys.handhelds Subject: Re: hp48sx: variable rename? Message-ID: <9612@mentor.cc.purdue.edu> Date: 4 Apr 91 22:42:44 GMT References: <1991Apr2.140223.7718@zip.eecs.umich.edu> <298uZ1w163w@ireta.cynic.wimsey.bc.ca> Organization: Purdue University Lines: 40 In <298uZ1w163w@ireta.cynic.wimsey.bc.ca> rob@ireta.cynic.wimsey.bc.ca (Rob Prior) writes: >kamidon@zip.eecs.umich.edu (Keith Amidon) writes: >> > \<< \-> old new \<< old RCL new STO old PURGE \>> \>> >I think it will fall apart right here. When you call 'old', it will >evaluate the contents of 'old' on the stack, putting you into the >directory. My 48sx isn't handy, so I can't try this, but I think that's >what will happen. Hmmm, this is interesting. What you say should happen, so I tried a couple examples out. Ok, as an example, I have a directory called MATH in my current directory. First I stored the value 'MATH' in a variable called A. I then pressed A on the menu keys, and, as expected, I went into the MATH directory. I then went back to MATH, and tried this program \<< A \>> Again, as expected, it went into the MATH dir. I went back up, and purged A. I then tried a little more complicated program \<< \-> OLD \<< OLD \>> \>> When this is run with 'MATH' on the stack, it does NOT enter the MATH dir. Instead, it returns the value 'MATH' back to the stack. So it seems that when the program calls the local variable OLD, it does not evaluate it as it does in the previous example where A was recalled. This makes programming a LOT easier and allows you to write a RENAME program like the ones that have been posted. -- Sean Ahern ----------- Purdue University --------- ahernsd@mentor.cc.purdue.edu Dan Quayle: "Japan is an important ally of ours. Japan and the United States of the Western industrialized capacity, 60 percent of the GNP, :-) two countries. That's a statement in and of itself."