Programming
21-7
Using programs
Run a program
From HOME, type
RUN
program_name.
or
From the Program catalog, highlight the program you
want to run and press
Regardless of where you start the program, all programs
run in HOME.
What you see will differ slightly depending
on where you started the program. If you start the
program from HOME, the HP 40gs displays the contents
of
Ans
(Home variable containing the last result), when
the program has finished. If you start the program from
the Program catalog, the HP 40gs returns you to the
Program catalog when the program ends.
Debug a
program
If you run a program that contains errors, the program
will stop and you will see an error message.
To debug the program:
1. Press
to edit the program.
The insert cursor appears in the program at the point
where the error occurred.
2. Edit the program to fix the error.
3. Run the program.
4. Repeat the process until you correct all errors.
Stop a program
You can stop the running of a program at any time by
pressing
CANCEL
(the
key).
Note: You may have to
press it a couple of times.
hp40g+.book Page 7 Friday, December 9, 2005 1:03 AM
Summary of Contents for 40gs
Page 10: ...hp40g book Page x Friday December 9 2005 1 03 AM ...
Page 64: ...hp40g book Page 22 Friday December 9 2005 1 03 AM ...
Page 80: ...hp40g book Page 4 Friday December 9 2005 1 03 AM ...
Page 86: ...hp40g book Page 4 Friday December 9 2005 1 03 AM ...
Page 100: ...hp40g book Page 4 Friday December 9 2005 1 03 AM ...
Page 126: ...hp40g book Page 22 Friday December 9 2005 1 03 AM ...
Page 182: ...hp40g book Page 28 Friday December 9 2005 1 03 AM ...
Page 274: ...hp40g book Page 22 Friday December 9 2005 1 03 AM ...
Page 303: ...Step by Step Examples 16 29 hp40g book Page 29 Friday December 9 2005 1 03 AM ...
Page 304: ...hp40g book Page 30 Friday December 9 2005 1 03 AM ...
Page 314: ...hp40g book Page 10 Friday December 9 2005 1 03 AM ...
Page 330: ...hp40g book Page 16 Friday December 9 2005 1 03 AM ...
Page 392: ...hp40g book Page 44 Friday December 9 2005 1 03 AM ...
Page 420: ...hp40g book Page 22 Friday December 9 2005 1 03 AM ...
Page 428: ...hp40g book Page 8 Friday December 9 2005 1 03 AM ...
Page 444: ...hp40g book Page 16 Friday December 9 2005 1 03 AM ...