beautypg.com

Debug a program – HP Prime Graphing Wireless Calculator User Manual

Page 251

background image

Programming in HP PPL

247

4. Tap

three

times to step through
the FOR loop. Notice

that the number
shown increments by
1 each time.

After the program
terminates, you can
resume any other activity with the HP Prime.
If a program has arguments, when you press

a

screen appears prompting you to enter the program
parameters.

Multi-function

programs

If there is more than one EXPORT function in a program,
when

is tapped a list appears for you to choose

which function to run. To see this feature, create a program
with the text:

EXPORT NAME1( )
BEGIN

END;
EXPORT NAME2( )
BEGIN

END;

Now note that when you select your program from the
Program Catalog and tap

or

, a list with

NAME1 and NAME2 appears.

Debug a

Program

You cannot run a program that contains syntax errors. If
the program does not do what you expect it to do, or if
there is a run-time error detected by the system, you can
execute the program step by step, and look at the values
of local variables.
Let’s debug the program created above: MYPROGRAM.