beautypg.com

Deleting program lines, Inserting program lines, Examples – HP 15c User Manual

Page 83

background image

Section 7: Program Editing

83

The Back Step (‚) Instruction. To move one line backwards in
program memory, press ‚ (back step) in Program or Run mode. This
function is not programmable. ‚ will scroll (with the key held down) in
Program mode. Program instructions are not executed.

Deleting Program Lines

Deletions of program instructions are made with − (back arrow) in
Program mode
. Move to the line you want to delete, then press −. Any
remaining following lines will be renumbered to stay in sequence.

Pressing − in Run mode does not affect program memory, but is used for
display clearing. (Refer to page 21.)

Inserting Program Lines

Additions to a program are made by moving to the line preceding the point
of insertion. Any instruction you key in will be added following the line
currently in the display. To alter an instruction, first delete it, then add the
new version.

Examples

Let's refer back to the can volume program on page 71 in section 6 and
make a few changes in the instructions. (The can program as listed below is
assumed to be in memory starting on line 001.)

Deletions: If we don't need the summed base area, volume, and surface area
values, we can delete the storage register additions (lines 007, 011, and
020).

Changes: To eliminate the need to stop the program to enter the height
value (h), change the ¦ instruction to a l 1 instruction (because of
the above deletions, R

1

is no longer being used) and store h in R

1

before

running the program. To clean things up, let's also alter O 4 (line 006)
to O 2 and l 4 (old line 016) to l 2, since we are no longer
using R

2

and R

3

.

The editing process is diagrammed on the next page.