|
Section 7: Simple Programming120
|
|
selectively clear programs from program memory. For example, if program memory looked
like this, you would clear just TEST1 or TEST2.
|
|
|
|
When you execute CLP and do not specify a function
name (press ALPHA ALPHA ),
the HP-41C clears the program the calculator is currently positioned to
in program memory.
|
|
Flowcharting Your Programs
|
|
At this point, we digress for a moment from our discussion of the calculator
itself to familiarize ourselves with a fundamental programming tool—the
flowchart.
|
|
Flowcharts are outlines of the way a program solves a problem. With
over 400 possible lines (2200 on a fully-enhanced HP-41C), it is quite easy
to get ‘‘lost’’ while creating a long program,
especially if you try to load a program from beginning to end with no breaks.
A flowchart can help you design your programs by breaking them down into
smaller groups of instructions.
|
|
Flowcharts can be as simple or as detailed as you like. Here is a flowchart that
shows the operations you executed to calculate the area of a circle according
to the formula A = π r2. Compare the flowchart to the actual
instructions for the program:
|