HP (Hewlett-Packard) 12C Calculator User Manual


 
Section 8: Programming Basics 113
File name: hp 12c pt_user's guide_English_HDPMF123E27 Page: 113 of 275
Printed Date: 2005/8/1 Dimension: 14.8 cm x 21 cm
To determine at any time how many program lines (including those containing
gi
000) are currently in program memory, press
gN
(memory). The
calculator will respond with a display like the following:
If you find yourself creating long programs, you should create your programs so
that they don’t use up program lines unnecessarily, since program memory is
limited to 400 program lines. One way to minimize program length is to replace
numbers consisting of more than just one digit — like the number 25 in lines 002
and 003 of the program keyed in above — by a
:
instruction, and then storing
the number in the designated storage register before running the program. In this
case, this would save one program line, since the
:
instruction requires only
one program line, not two as are required by the number 25. Of course, doing so
uses up data storage registers that you might want to save for other data. As in
many business and financial decisions, there is a trade off involved; here it is
between program lines and data storage registers.