(50g) FNINVARS: Object finder for couch hackers
|
10-11-2017, 05:36 AM
Post: #1
|
|||
|
|||
(50g) FNINVARS: Object finder for couch hackers
SCENARIO #1: Ever write a nifty program, then try to find it in your 50g a few weeks later, but you forgot what you named it? (This happens to me all the time, and I bet it happens to all inveterate couch hackers, especially those of us with aging memories.)
SCENARIO #2: Ever want to purge a program that you don't THINK you need any more, but you're afraid that something ELSE in memory might need it? (This happens to me a lot too, resulting in VARS getting bloated with unneeded programs). This program, FNINVARS (Find In VARS), helps in these situations. Just put any object on the stack, either by itself or in a list, and then run FNINVARS. A list will be returned containing the names of all the programs in HOME which contain that object. If FNINVARS is in a subdirectory, it will search the VARS of that subdirectory. You can search for any object, such as a command, or a global name, or a number... anything that you remember putting in that program you're looking for. Just like a Google search, the more unique the object is, the more useful the search result will be. While FNINVARS is running, the object it is searching for is displayed at the top of the screen, as well as a countdown as it searches through VARS. Making it run faster by rewriting it in System RPL is left as an exercise for couch hackers. ;-) Example 1: I recently wrote a program that uses the →Q function, but I can't remember what I called it. {→Q} FNINVARS --> list of all programs in HOME which call the →Q function. Example 2: Can I safely purge my old 'BOOFAR' program? 'BOOFAR' FNINVARS --> list of all the programs which call 'BOOFAR'. Note: FNINVARS does not search for specific compound objects. For example, if you input { { 1 2 3 } } as the search object, FNINVARS will return a list of all programs which contain ANY list, regardless of its contents. The same is true for any compound object. N.B. This program uses the →S2 command from Library 256, which is built into your HP 50g but by default is not attached. If you don't keep Library 256 attached, then be sure to do 256 ATTACH before compiling this program. Once it's properly compiled and stored, it will continue to work even if Library 256 is not attached. Code: %%HP: T(3)A(R)F(.); <0|ɸ|0> -Joe- |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
(50g) FNINVARS: Object finder for couch hackers - Joe Horn - 10-11-2017 05:36 AM
RE: (50g) FNINVARS: Object finder for couch hackers - Gerald H - 10-11-2017, 07:06 AM
RE: (50g) FNINVARS: Object finder for couch hackers - pier4r - 10-11-2017, 03:31 PM
RE: (50g) FNINVARS: Object finder for couch hackers - rprosperi - 10-11-2017, 06:50 PM
RE: (50g) FNINVARS: Object finder for couch hackers - DavidM - 10-11-2017, 08:38 PM
RE: (50g) FNINVARS: Object finder for couch hackers - rprosperi - 10-12-2017, 02:21 AM
FLIBS: Library Finder for couch hackers - rprosperi - 10-16-2017, 12:01 AM
|
User(s) browsing this thread: 1 Guest(s)