More – HP Prime Graphing Wireless Calculator User Manual

Page 303

Advertising
background image

Programming in HP PPL

299

More

%CHANGE

Syntax: %CHANGE(x,y)
The percentage change in going from x to y.
Example: %CHANGE(20,50) returns 150.

%TOTAL

Syntax: %TOTAL(x,y)
The percentage of x that is y.
Example: %TOTAL(20,50) returns 250.

CAS

Syntax: CAS.function() or CAS.variable
Executes the function or returns the variable using the

CAS.

EVALLIST

Syntax: EVALLIST({list})
Evaluates the content of each element in a list and returns

an evaluated list.

EXECON

Syntax: EXECON(&expr, List1, [List2,…])
Creates a new list based on the elements in one or more

lists by iteratively modifying each element according to an

expression that contains the ampersand character (&).
Examples:

EXECON("&+1",{1,2,3})

returns

{2,3,4}

Where the & is followed directly by a number, the position

in the list is indicated. For example:

EXECON("&2–&1",{1, 4, 3, 5}"

returns

{3, –1,

2}

In the example above, &2 indicates the second element

and &1 the first element in each pair of elements. The

minus operator between them subtracts the first from the

second in each pair until there are no more pairs. In this

case (with just a single list), the numbers appended to &

can only be from 1 to 9 inclusive.
EXECON can also operate on more than one list. For

example:

EXECON("&1+&2",{1,2,3},{4,5,6})

returns

{5,7,9}

In the example above, &1 indicates an element in the first

list and &2 indicates the corresponding element in the

Advertising