Article 3053 of comp.sys.handhelds: Path: en.ecn.purdue.edu!noose.ecn.purdue.edu!samsung!zaphod.mps.ohio-state.edu!van-bc!ubc-cs!sol.UVic.CA!student!mwarburt From: mwarburt@student.UVic.CA (Mark "!" Warburton) Newsgroups: comp.sys.handhelds Subject: Recursive VARS Summary: List of all variables in your HP-48sx Message-ID: <1990Dec24.011147.28080@sol.UVic.CA> Date: 24 Dec 90 01:11:47 GMT Sender: news@sol.UVic.CA Distribution: comp.sys.handhelds Organization: University of Victoria, Victoria, BC, Canada Lines: 52 Nntp-Posting-Host: student.uvic.ca Here is a program I whipped up which will hunt through the VAR directories of your HP-48sx and will return a list containing every "name" which it finds. Like the built-in VARS command, it returns everything which would show up in the var menu. Unlike the VARS command, it is not limited to the names in the current directory. Instead, it finds the names in ALL directories. Since the program uses recursion to traverse the tree structure of the directories, it is important that it be named with the same name it uses to "call itself". I called it TREE, but if you have a more meaningful name for it, be sure to change the TREE command within the program itself. The program may not seem very useful, but it is interesting to see just how many vars you have in your little wonder-box. The program can be easily modified to do some handy housekeeping tasks, such as PURGEing all of the PPARS in all directories of the calculator. (I plan to set an alarm, so my HP turns on at 4:00 am each morning, erases all PPARS, and then quietly turns itself off again...) If you don't know how to modify this program to do this, just send me mail, and I will send you the slightly modified version. Mark Warburton Electrical Engineering University of Victoria, BC, Canada. P.S. Has anybody figured out a way to use the HP-48sx as an infra-red remote-controller? I am very interested in that. Well, here's the program: TREE: # 671h 178.5 bytes ------------------------------------------------------------------------------- %%HP: T(3)A(D)F(.); @ This program will return a list of ALL variables \<< VARS 1 @ in your HP-48sx. It does so by recursively DO GETI DUP DEPTH @ searching each directory. The list it returns ROLLD @ is in the same format as the list returned by the IF DUP RCL DUP @ "VARS" command. TYPE 15 == SWAP @ BYTES SWAP DROP 6.5 @ Be sure to put this program in the HOME directory. > AND THEN EVAL TREE @ Change TREE to whatever you name this program. UPDIR ELSE DROP END UNTIL DUP 1 == END DROP DROP IF PATH { HOME } == THEN { } WHILE DEPTH 1 \=/ REPEAT SWAP + END END \>>