Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!emory!wrdis01!gatech!usenet.ins.cwru.edu!po.CWRU.Edu!rkb From: rkb@po.CWRU.Edu (Robert K. Brunner) Newsgroups: comp.sys.handhelds Subject: Re: hp48sx: variable rename? Message-ID: <1991Apr2.200218.10916@usenet.ins.cwru.edu> Date: 2 Apr 91 20:02:18 GMT References: Sender: news@usenet.ins.cwru.edu Reply-To: brunner@uirvld.csl.uiuc.edu (Robert K. Brunner) Organization: Case Western Reserve University, Cleveland, Ohio, (USA) Lines: 27 Nntp-Posting-Host: cwns5.ins.cwru.edu In a previous article, mheubi@.itr.uu.ch (Heubi Matthias) says: > >The clean solution is to RCL the object to the stack, PURGE it, and then >STO it under the new name. Tho only problem on this way will be, that >the renamed object is now ordered as the first variable. > Heres a quick program to retain the prior order. Its kind of slow. \<< \-> src dst \<< VARS src RCL src PURGE dst STO OBJ\-> { } SWAP 1 SWAP START SWAP DUP IF src SAME THEN DROP dst END SWAP + NEXT \>> ORDER \>> By the way, isn't the indentation nice. If you print the variable instead of kermiting it, you get fairly nice indentation. Robert brunner@uirvld.csl.uiuc.edu