From: jhmeyers@miu.edu (John H Meyers)
Subject: Hidden Directory utilities (improved) for HP48S/SX/G/GX
Date: 20 May 1997 00:00:00 GMT
Message-ID: <5lsmk1$mnv$1@news.iastate.edu>
Organization: M.U.M. (Author's personal opinion only)
Newsgroups: comp.sys.hp48


I've just replaced all my User-RPL "hidden directory" utilities
(for HP48S/SX/G/GX) with simpler, shorter, and more flexible ones,
using only one supported system entry point for all functions.

The purpose of these programs is to store and recall variables
within the "hidden directory" rather than the current directory,
without having to do anything to change the current directory;
this can be used to "hide" variables, while also making them
globally available (accessible from any directory).

%%HP: T(3); @ \-> means right-arrow, etc.
DIR @ Start of directory (move programs into HOME for general use)
  STOH @ object 'name' (store variable)
    \<< { STO } WHID \>>
  RCLH @ 'name' --> object (recall variable)
    \<< { RCL } WHID \>>
  PGH @ 'name' or { name... } (purge variable or list of variables)
    \<< { PURGE } WHID \>>
  VARH @ --> { name... } (list current hidden variable names)
    \<< { VARS } WHID 1 OVER SIZE 3 - SUB \>> @ omit reserved names
  STRH @ "string" --> object (does not execute commands)
    \<< { STR\-> } WHID \>>
  WHID
    \<< #64037h SYSEVAL EVAL \>> @ WithHidden EVAL (note HEX address)
END @ End of directory

If typing this in by hand, please carefully verify
the HEX system entry point address (note the letter "h").
The @ symbol introduces comments, which need not be entered.

Be sure to use unique variable names to avoid conflicts; however,
names used within the hidden directory will not conflict with
names used in any other directory, including HOME.

Errors (e.g. recalling a non-existent variable) produce the
normal error conditions, and leave the current directory unchanged.

This may look similar to HSTO from Goodies Disk #7, but these programs
are more flexible (e.g. perform list processing wherever available);
VARH does not try to enter the hidden directory using a null name,
as did HVARS (using a null name may conflict with HIDE, HIDER, etc.),
and an additional function (STRH) is also provided.

HOME directory backups made with the ARCHIVE command include the
contents of the hidden directory.

Some unusual events (e.g. Try to Recover Memory? --> Yes)
may cause the original hidden directory contents to be lost.

DO NOT disturb "reserved" system variables: Alarms, UserKeys, UserKeys.CRC
(variables kept by the HP48 in the hidden directory, for internal use);
you may recall these for your own curiosity, but do not alter or purge!

Some popular programs also use the hidden directory to store
information, thus creating additional "reserved" variable names.

Program STRH offers "safer" compilation of strings (e.g. after INPUT),
because it will not actually evaluate any words which are commands,
functions, or Global variables (e.g. CLVAR, PURGE, EXP, \pi, IOPAR);
any such words will be compiled into unresolved Global Names;
note that program delimiters are commands, and will error if compiled;
algebraic expressions will do likewise.

Example: "1 2 3 CLVAR" STRH --> 1 2 3 'CLVAR' (four stack levels)

May you find many hidden treasures as you explore your magnificent HP48.

-----------------------------------------------------------
With best wishes from:   John H Meyers   <jhmeyers@mum.edu>

