HP 39g Master Manual page 232

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

Advertisement

If the left or right arrows have been pressed (keys 34.1 or 36.1) then the line
is 'twisted' by changing the value of M. If the up or down arrows have been
pressed (keys 25.1 or 35.1) then the line is raised or lowered by changing the
value of C. See the manual for more information on the GETKEY and CASE
commands and on key values.
The final check in the line UNTIL K==105.1 END: is to see if the user has
pressed the ENTER key. If so then the loop will terminate and the screen will
erase. If not then the loop begins again with the new line being displayed.
On termination of the program the VIEWS menu will display again, because
we chose this when designing the aplet in the ADK.
This aplet illustrates most of the commonly used programming techniques. If
you would like to gain experience then I suggest that you do as I did -
download aplets and pull them apart to see how they work.
If you would like to further enhance this aplet then try the following:
-
change the order of the code so that the labels are drawn after the line,
thus ensuring that the text is never obscured by the line.
-
add a new variable D to allow the size of the increment to change. Set an
initial value of D of 0.5 at the same point as the values of M and C. Then
change the lines above so that D is added/subtracted instead of 0.5. Add
two more IFs to the CASE statement so that if they press '+' the
increment doubles, and if '-' then it halves. You will also need to add
another message box line telling them about this. Finally, add a line to
display the current increment size at the top right of the screen using the
DISPXY command.
The explanation so far should help you in understanding the programming
process on the hp 39g+. The aplet structure is well designed and, if you take
advantage of the VIEWS menu structure, offers easy creation of complex and
very powerful teaching aplets. Certainly what has been discussed here is
enough that a programmer will be able to make a start without some of the
errors that I made.
232

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

40g39g+

Table of Contents