
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 multicharacter, but must follow certain rules; see Variables
and visibility on page 567 for details.
User variables, like CAS variables, are not typed and thus may contain objects of dierent 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 the “Variables“ chapter.
For user variables in programs, see The HP Prime programming language on page 567.
App variables
Not all app variables are used in every app. S1Fit, for example, is only used in the Statistics 2Var app.
However, many of the variables are common to the Function, Advanced Graphing, Parametric, Polar,
Sequence, Solve, Statistics 1Var, and Statistics 2Var apps. If a variable is not available in all of these apps, or is
available only in some of these apps (or some other app), then a list of the apps where the variable can be
used appears under the variable name.
The following sections list the app variables by the view in which they are used. To see the variables listed by
the categories in which they appear on the Variables menu see the “App variables” section of the “Variables”
chapter.
Current app variables
These variables give the user access to data and les associated with the currently active app.
AFiles
Each HP Prime app can have any number of les associated with it. These les are sent with the app. For
example, if there is a le named icon.png associated with the app, then this le is used for the app icon in the
Application Library.
AFiles returns the list of all these les.
AFiles("name") returns the contents of the le with the given name.
AFiles("name"):= object stores the object in the le with the given name.
AFilesB
Each HP Prime app can have any number of les associated with it. These les are sent with the app. AFilesB
is the binary equivalent of the AFiles variable.
AFilesB returns the list of all les associated with an app.
AFilesB("name") returns the size of the le with the given name.
AFilesB("name", position, [nb]) returns nb bytes read from the le with the given name,
starting from position in the le (position starts at 0).
AFilesB("name", position):= value or {values...} stores n bytes, starting at position, in the
le with the given name.
ANote
ANote returns the note associated with an HP app. This is the note displayed when the user presses
.
614 Chapter 28 Programming in HP PPL
Komentarze do niniejszej Instrukcji