242 Programming
with an example showing how to store a value into the
variable:
These names are reserved by the system. These (and all
other) system variables are visible everywhere, and users
may not use the names for other data. That is, you may
not name a program L1, for example, nor store a real
number into a variable named G1. A full list of system
variables appears in the chapter titled, Reference
Information. Besides these reserved variables, each HP
app has its own reserved variables. For more information
on these variables, see the section in this chapter
Variables and programs.
Within a program, you can declare variables for use only
within a particular function. This is done using a LOCAL
declaration. The use of LOCAL variables allows the
programmer to declare and use variables that will not
affect the rest of the calculator. LOCAL variables
declared by the programmer are not bound to a
particular type. That is, you can store floating-point
numbers, integers, lists, matrices, and symbolic
expressions into a variable with any local name.
Although the system will allow you to store different types
Type Names Store Example
Real number A-Z and 2.7
R
Complex
numbers
Z0-Z9 (2,3)
Z1
Lists L0-L9
C0-C9
D0-D9
{ 1, 2, 3 ,4} L1
Matrices M0-M9 [[1,2],[3,4],[5,6]]
M1
Graphics G0-G9 See graphics
section
Functions F0-F9 COS(X) F1