beautypg.com

Variables and programs – HP Prime Graphing Calculator User Manual

Page 562

background image

556

Programming in HP PPL

TYPE

Syntax: TYPE(object)
Returns the type of the object:
0: Real
1: Integer
2: String
3: Complex
4: Matrix
5: Error
6: List
8: Function
9: Unit
14.?: cas object. The fractional part is the cas type.

Variables and Programs

The HP Prime has four types of variables: Home variables,
App variables, CAS variables, and User variables. You
can retrieve these variables from the Variable menu (

a

).

The names of Home variables are reserved; that is, they
cannot be deleted from the system and cannot be used to
store objects of any other type than that for which they
were designed. For example, A–Z and θ are reserved to
store real numbers, Z0–Z9 are reserved to store complex
numbers, and L0–L9 are reserved to store lists, etc. As a
result, you cannot store a matrix in L8 or a list in Z.
Home variables keep the same value in Home and in
apps; that is, they are global variables common to the
system. They can be used in programs with that
understanding.

App variable names are also reserved, though a number
of apps may share the same app variable name. In any of
these cases, the name of the app variable must be
qualified if that variable is not from the current app. For
example, if the current app is the Function app, Xmin will

return the minimum x-value in the Plot view of the Function
app. If you want the minimum value in the Plot view of the
Polar app, then you must enter Polar.Xmin. App