Adding Instructions Within A Program; Adding Instructions By Replacement - HP 12C User Manual

Platinum financial calculator
Hide thumbs Also See for 12C:
Table of Contents

Advertisement

142 Section 10: Program Editing
Keystrokes
(ALG mode)
15000t

Adding Instructions within a Program

If an instruction is to be added within a program, simply keying it in will replace
the instruction previously stored in that program line, as described above; the
contents of all higher-numbered program lines remain unchanged.
To add instructions within a program, you could simply key in the new instructions,
beginning at the proper program line, followed by the original instructions from
that program line through the end of the program. This method is described below
under Adding Instructions by Replacement. When instructions must be added in the
middle of a long program, however, using this method will require you to key in
numerous instructions — namely, the original instructions from the point at which
the new instructions are added through the end of program memory. Since keying
in these instructions may require a significant amount of time, in such situations you
may prefer to use the method described below under Adding Instructions by
Branching.
That method basically involves branching to the new instructions which are stored
at the end of program memory, then branching back to the program line
immediately following the line from which you branched out. Adding instructions
by branching is not so simple as adding instructions by replacement; however, it
generally will require fewer keystrokes whenever there are more than four program
lines between (and including) the first line to be executed after the new instruction(s)
and the last line you keyed into program memory. Furthermore, if program
memory includes branches to program lines following the point at which the new
instruction(s) are being added, adding instructions by branching will not require
that you change the line numbers specified in the i instructions, which may be
necessary when you add instructions by replacement.

Adding Instructions by Replacement

1. Press fs to set the calculator to Program mode.
2. Press gi. followed by three digits that specify the last program line to
be executed before the added instruction(s). This sets the calculator to the
proper program line for adding the new instruction(s) in the next step.
3. Key in the new instruction or instructions.
File name: hp 12c pt_user's guide_English_HDPMF123E27
Printed Date: 2005/8/1
Display
12,000.00
Net income after 20% tax is
subtracted from $15,000
income.
Page: 142 of 275
Dimension: 14.8 cm x 21 cm

Advertisement

Table of Contents
loading

Table of Contents