User's Manual

Programming in HP PPL 557
variables represent the definitions and settings you make
when working with apps interactively. As you work
through an app, the app functions may store results in app
variables as well. In a program, app variables are used to
edit an app’s data to customize it and to retrieve results
from the app’s operation.
CAS variables are similar to the Home real variables A–Z,
except that they are lowercase and designed to be used
in CAS view and not Home view. Another difference is
that Home and App variables always contain values,
while CAS variables can be simply symbolic and not
contain any particular value. The CAS variables are not
typed like the Home and App variables. For example, the
CAS variable t may contain a real number, a list, or a
vector, etc. If a CAS variable has a value stored in it,
calling it from Home view will return its contents.
User variables are variables created by the user, either
directly or exported from a user program. They provide
one of several mechanisms to allow programs to
communicate with the rest of the calculator and with other
programs. User variables created in a program may be
either local to that program or global. Once a variable
has been exported from a program, it will appear among
the user variables in the Variables menu, next to the
program that exported it. User variables may be multi-
character, but must follow certain rules; see “Variables
and visibility” on page 511 for details.
User variables, like CAS variables, are not typed and thus
may contain objects of different types.
The following sections deal with using app variables in
programs, providing descriptions of each app variable by
name and its possible contents. For a list of all the Home
and app variables, see chapter 22, “Variables,
beginning on page 423. For user variables in programs,
see “The HP Prime programming language, beginning
on page 511.