Variables 423
22
Variables
Variables are objects that have names and contain data.
They are used to store data, either for later use or to
control settings in the Prime system. There are four types of
variables, all of which can be found in the
Vars menu by
pressing
a:
• Home variables
• CAS variables
• App variables
• User variables
The Home and app
variables all have names
reserved for them. They
are also typed; that is, they can contain only certain types
of objects. For example, the Home variable A can only
contain a real number. You use Home variables to store
data that is important to you, such as matrices, lists, real
numbers, etc. You use app variables to store data in apps
or to change app settings. You can accomplish these
same tasks via the user interface of an app, but app
variables give you a quick way of doing these tasks, either
from Home or within a program. For example, you can
store the expression “SIN(X)” in the Function app
variable F1 in Home View, or you could open the Function
app, navigate to F1(X), and enter SIN(X) in that field.
CAS and user variables can be created by the user and
they have no particular type. Their names may be of any
length as well. Thus, diff(t2,t) returns 2*t and
diff((bt)2, bt) returns 2*bt for the CAS variables
t and bt. Further evaluation of 2*bt will only return
2*bt, unless an object has been stored in bt. For
example, if you enter bt:={1,2,3} and then enter
diff((bt)2, bt), the CAS will still return 2*bt. But if