beautypg.com

Debug a program – HP Prime Graphing Calculator User Manual

Page 511

background image

Programming

507

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 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.
1. In the Program

Catalog, select
MYPROGRAM.

Sx

Select
MYPROGRAM

2. Tap .

If there is more than
one EXPORT function
in a file, a list
appears for you to
choose which
function to debug.
While debugging a
program, the title of the program or intra-program
function appears at the top of the display. Below that
is the current line of the program being debugged.