Download  Print this page

HP -28S Manual Page 279

Advanced scientific calculator.
Hide thumbs

Advertisement

Techniques:
• List of variables. DOWN uses VARS to return the list of variables
and subdirectories in the current directory.
• Error trap. To check whether a name in the VARS list is a directory,
DOWN uses the name as an argument to RCL; since directories
can't be recalled to the stack, an error occurs if the name is a direc-
tory name, and the name is added to the list of directory names.
Program
::~.
' • ..'AR:3
"* './
.
::::
::::"
v
SIZE
FOF:
.j
v
.j
GET
I
FERR
F.:CL
DROP
THEt~
+
END
~lDn
t'lnW
I
ENTER
I
~
DOWN ISTol
Comments
Begin the program.
Put on the stack a list of the
names of all variables and
subdirectories.
Store the VARS list in a local
variable
v.
Begin the defining program .
Put the list of directory names on
the stack (initally empty).
Put 1 and
size of v on the stack.
For each name in
v,
do the
following:
Get the name.
Attempt to recall the contents of
a variable with that name; if suc-
cessful, drop the contents.
If RCL caused an error, the name
must be a directory name, so add
the name to the list of directory
names.
End of the THEN clause and the
program structure.
Repeat for next name in v.
Create a custom menu for the di-
rectory names.
End the defining program.
End the program.
Put the program on the stack.
Store the program as DOWN.
278
28: Programming Examples

Advertisement

Table of Contents

   Also See for HP HP-28S

   Related Manuals for HP HP-28S

Comments to this Manuals

Symbols: 0
Latest comments: