App functions – HP Prime Graphing Wireless Calculator User Manual

Page 294

Advertising
background image

290

Programming in HP PPL

number. REPLACE also works with lists, graphics, and

strings. For example, REPLACE("123456", 2, "GRM") ->
"1GRM56"

SCALE

Syntax: SCALE(matrix, value, rownumber)
Multiplies the specified row_number of the specified
matrix by value.

SCALEADD

Syntax: SCALEADD (matrix, value, row1, row2)
Multiplies the specified row1 of the matrix by value,

then adds this result to the second specified row2 of the

matrix and replaces row1 with the result.

SUB

Syntax: SUB (matrix, start, end)
Extracts a sub-object—a portion of a list, matrix, or
graphic—and stores it in matrix. Start and end are each
specified using a list with two numbers for a matrix, a
number for vector or lists, or an ordered pair, (X,Y), for
graphics: SUB(M1{1,2},{2,2})

SWAPCOL

Syntax: SWAPCOL (matrix, column1, column2)
Swaps column1 and column2 of the specified matrix.

SWAPROW

Syntax: SWAPROW(matrix, row1, row2)
Swaps row1 and row2 in the specified matrix.

App Functions

These commands allow you to launch any HP app, bring
up any view of the current app, and change the options in
the View menu.

STARTAPP

Syntax: STARTAPP("name")

Starts the app with name. This will cause the app
program’s START function to be run, if it is present. The

app’s default view will be started. Note that the START

function is always executed when the user taps

in

the Application Library. This also works for user-defined
apps.
Example: STARTAPP("Function") launches the Function

app.

STARTVIEW

Syntax: STARTVIEW( [,draw?])

n

Advertising