• 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.
' • ..'AR:3
Begin the program.
Put on the stack a list of the
names of all variables and
Store the VARS list in a local
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
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
End of the THEN clause and the
Repeat for next name in v.
Create a custom menu for the di-
End the defining program.
End the program.
Put the program on the stack.
Store the program as DOWN.
28: Programming Examples