HP 39g Master Manual page 230

Graphing calculator
Hide thumbs Also See for 39g:
Table of Contents

Advertisement

Still referring to the code on the previous page, you will see that it refers to
PageNum. The sketches in the hp 39g+'s SKETCH view are numbered 1, 2,
3...etc. Sketch number 1 is always present but after that only sketches that
have been created are available and the program will crash if you try to
access one that does not exist. The aplet variable PageNum is the pointer to
the sketch you want and the actual sketch is called Page. Thus the two lines
after ELSE tell the program to store the PLOT view into the first page of the
SKETCH view. The PLOT view must exist before this can be done or the
program will crash. If you run the program and then later change to the
SKETCH view you will be able to see this stored image. Finally, the user is
presented with two messages which tell them what to do.
The next section begins the code which performs the work in the aplet.
The first line assigns initial values to the variables M (gradient) and C (y-
intercept). The DO...UNTIL loop which follows (partly in the next section of
code) loops through the code within it until the ENTER key is pressed.
Within the loop, the previously stored SKETCH view is transferred from
storage to the display using the
DISPLAY command. The equation of the
current line is then displayed in the top left corner using the DISPXY
command. Two versions are needed to avoid an expression like "y=2x+ -1".
The DISPXY command was a late addition to the calculator and was added
at my request (many thanks, Jean-Yves and Cyrille!). It is a hugely useful
command to programmers but because it was added at the last minute it
does not appear in the manual for the hp 39g. It may have been added to the
hp 39g+'s manual. It does appear in the Prompt section of the MATH menu.
230

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

40g39g+

Table of Contents