Variable, Function – HP Prime Graphing Wireless Calculator User Manual
Page 277
![background image](/manuals/397843/277/background.png)
Programming in HP PPL
273
Variable
These commands enable you to control the visibility of a
user-defined variable.
LOCAL
Local.
Syntax: LOCAL var1,var2,…varn;
Makes the variables var1, var2, etc. local to the program
in which they are found.
EXPORT
Syntax: EXPORT var1, var2, …, varn;
Exports the variables var1, var2, etc. so they are globally
available and appear on the User menu when you press
a
and select
.
Function
These commands enable you to control the visibility of a
user-defined function.
EXPORT
Export.
Syntax: EXPORT FunctionName(Parameters) or
Export Var{:=Val) or Export Var1[:=Val1],
Var2[:=Val2], ...)
In a program, declares the functions or variables to export
globally. The exported functions appear in the Toolbox
User menu and the exported variables appear in the Vars
CAS, App, and User menus.
For an exported function, there are two uses of EXPORT.
Forward function declaration:
EXPORT function(params);
Normal function declaration:
EXPORT function[(params)]
BEGIN
//Function definition goes here
END;
Examples:
EXPORT X2M1(X);
EXPORT ratio:=0.15;