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.
  01 LBLTTEST1    
  02 LOG    
You could clear just these instructions
  03 +    
by executing CLP , specifying
  04 STO 10    
TEST1 as the program name, or ...
  05 END    
  01 LBLTTEST2    
  02 LOG    
... you could clear just these
  03 –    
instructions by executing CLP ,
  04 STO 11    
specifying TEST2 as the program
  05 END    
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: