HP 9g Graphing manual End

Page 28

Each program needs an END command to mark the end of the program. This is displayed automatically when you create a new program.

Increment and decrement

 

 

Post-fixed: Memory variable + +

or

Memory variable – –

Pre-fixed: + + Memory variable

or

– – Memory variable

A memory variable is decreased or increased by one. For standard memory variables, the + + ( Increment ) and – – ( Decrement ) operators can be either post-fixed or pre-fixed. For array variables, the operators must be pre-fixed.

With pre-fixed operators, the memory variable is computed before the expression is evaluated; with post-fixed operators, the memory variable is computed after the expression is evaluated.

For loop

FOR ( start condition; continue condition; re-evaluation ) { statements }

A FOR loop is useful for repeating a set of similar actions while a specified counter is between certain values.

For example:

FOR ( A = 1 ; A 4 ; A + + )

{C = 3 × A ; PRINT ANS = , C }

END

Result : ANS = 3, ANS = 6, ANS = 9, ANS = 12

The processing in this example is:

1.FOR A = 1: This initializes the value of A to 1. Since A = 1 is consistent with A 4, the statements are executed and A is incremented by 1.

2.Now A = 2. This is consistent with A 4, so the statements are executed and A is again incremented by 1. And so on.

3.When A = 5, it is no longer true that A 4, so statements are not executed. The program then moves on to the next block of code.

Sleep command

SLEEP ( time )

A SLEEP command suspends program execution for a specified time (up to a maximum of 105 seconds). This is useful for displaying intermediate results before resuming execution.

Swap command

SWAP ( memory variable A, memory variable B )

E-28

Image 28
Contents Hp 9g Graphing Calculator Contents Other Functions x-1, , , ,x 2, x Statistical CalculationsProgramming Power Supply Contrast AdjustmentDisplay Features Selecting an Item from a Menu Changing ModesKey Labels Cursor Using the 2nd and Alpha keysInserting and Deleting Characters Recalling Previous Inputs and Results MemoryOrder of Operations Accuracy and Capacity RandiDMS Error Conditions StatArithmetic Calculation Display FormatParentheses Calculations Percentage CalculationsRepeat Calculations Answer FunctionFraction Calculation Logarithm and AntilogarithmConverting Angular Units Trigonometric and Inverse Trigonometric functions Hyperbolic and Inverse Hyperbolic functionsCoordinate Transformations Mathematical FunctionsUnit Conversion Physics Constants Built-in Function Graphs Multi-statement functionsUser-generated Graphs Graph ↔ Text Display and Clearing a Graph Zoom FunctionSuperimposing Graphs Trace FunctionPlot and Line Function Scrolling GraphsSingle-Variable and Two-Variable Statistics Process Capability Correcting Statistical Data Probability Distribution 1-Var DataRegression Calculation QuadBasic Arithmetic Operations for Bases Negative ExpressionsLogical Operation Before Using the Program Area Program Control InstructionsInput memory variable END Creating a New Program Relational OperatorsExecuting a Program Using the Graph Function in Programs Display Result CommandDebugging a Program Deleting a ProgramProgram Examples × 5 + 56 7 74 8 × 7 = × 5 M+ MRC × 7 2nd M MRC MRC CL / ESC Example Prog 1 CL / ESC + 10 × 8 2 = 12369 × 7532 × 2nd SCI / ENG 20 2nd ENG SYM + 0.15 2nd ENG SYM 55 2nd % 2nd ANS B/c 2 a b/c 2nd a b/c d/e 2nd 2nd DMS Cosh1.5+2 = 2nd HYP cos Sinh -17 = 2nd HYP 2nd sin 2nd R P Alpha Page Page Page 26 7 ! 7 4 ! = Math Math Math Math 27 7 ! 7 4 ! × 4 = 2nd 30 7 4 = × 2nd Const Graph 2nd e Example Range Graph Alpha X 2nd x 3 + Alpha X x 2 Graph Alpha X + Graph cos Trace 2nd X Y Page Example 2nd Statvar Graph Example Example 2nd Statvar Example Nd Statvar Graph 2nd Statvar 573 Data 101 61 117 67 2nd Statvar Graph Nd Statvar 143 31 10 = 1F16 = 11111 2 = 37 Mode Dhbo Mode 2 dhbo Dhbo 4777 Mode 2 dhbo Dhbo 1234 + IE if Example RUN Seconds Seconds Example X 2 7 X + 5 = 0 X 1 = 2.5 , X 2 = 25 X 2 70 X + 49 = 0 X = 2 + 2 X + 5 = 0 X 1 = 1 + 2 i , X 2 = 1 2 When the message 1 AN, 2 SN appears on the display, you can = 3 , D = 2, N = 12 S N = S 12 = Seconds RUN Page Example Example RUN 486 Seconds Example Edit Dhbo 11011 = 10 C = 130 , D = 2nd RCL CL/ESC
Related manuals
Manual 2 pages 9.13 Kb