beautypg.com

Commands under the cmds menu, Strings, Commands – HP Prime Graphing Wireless Calculator User Manual

Page 278: Under the cmds menu, Commands under the cmds menu strings

background image

274

Programming in HP PPL

Export X2M1(X)

BEGIN

RETURN X^2-1;

END;

VIEW

Syntax: VIEW “text”, functionname();
Replaces the View menu of the current app and adds an

entry with “text”. If “text” is selected and the user

presses

or

E

, then functionname() is

called.

KEY

A prefix to a key name when creating a user keyboard.

See “The User Keyboard: Customizing key presses” on

page 256.

Commands under the Cmds menu

Strings

A string is a sequence of characters enclosed in double
quotes (""). To put a double quote in a string, use two
consecutive double quotes. The \ character starts an
escape sequence, and the character(s) immediately
following are interpreted specially. \n inserts a new line
and two backslashes insert a single backslash. To put a
new line into the string, press

E

to wrap the text at

that point.

ASC

Syntax: ASC (string)
Returns a list containing the ASCII codes of string.
Example: ASC("AB") returns [65,66]

CHAR

Syntax: CHAR(vector) or CHAR(integer)
Returns the string corresponding to the character codes in
vector, or the single code of integer.

Examples: CHAR(65) returns "A"
CHAR([82,77,72]) returns "RMH"

DIM

Syntax: DIM(string)