HP 9g Graphing manual Input memory variable

Page 27

INPUT memory variable

Makes the program pause for data input. memory variable = _

appears on the display. Enter a value and press []. The value is assigned to the specified variable, and the program resumes execution. To input more than one memory variable, separate them with a semicolon (;).

PRINT “ text ” , memory variable

Print the text specified inside the double quotation marks and the value of the specified memory variable.

Conditional branching

IF ( condition ) THEN { statement }

IF the condition is true, THEN statement is executed. IF ( condition ) THEN { statement }; ELSE { statement }

IF the condition is true, the specified THEN statement is executed, otherwise the ELSE statement is executed.

Jump commands

Lbl n

An Lbl n command marks a destination point for a GOTO n jump command. Each label name (Lbl) must be unique (that is, not repeated in the same program area). The label suffix n must be an integer from 0 to 9.

GOTO n

When program execution encounters a GOTO n statement, execution jumps to Lbl n (where n is the same value as the n in the GOTO n statement).

Mainroutine and Subroutine

GOSUB PROG n ;

You can jump between program areas, so that the resulting execution is made up of code from different program areas. The program from which other program areas are jumped to is the mainroutine, and an area jumped to is a subroutine. To cause a jump to a subroutine, enter PROG n where n is the number of the destination program area.

Note: The GOTO n command does not allow jumps between program areas. A GOTO n command only jumps to the corresponding label (Lbl) within the same program area.

End

E-27

Image 27
Contents Hp 9g Graphing Calculator Contents Statistical Calculations Other Functions x-1, , , ,x 2, xProgramming Contrast Adjustment Power SupplyDisplay Features Changing Modes Selecting an Item from a MenuKey Labels Using the 2nd and Alpha keys CursorInserting and Deleting Characters Memory Recalling Previous Inputs and ResultsOrder of Operations Randi Accuracy and CapacityDMS Stat Error ConditionsDisplay Format Arithmetic CalculationAnswer Function Parentheses CalculationsPercentage Calculations Repeat CalculationsLogarithm and Antilogarithm Fraction CalculationConverting Angular Units Mathematical Functions Trigonometric and Inverse Trigonometric functionsHyperbolic and Inverse Hyperbolic functions Coordinate TransformationsUnit Conversion Physics Constants Multi-statement functions Built-in Function GraphsUser-generated Graphs Trace Function Graph ↔ Text Display and Clearing a GraphZoom Function Superimposing GraphsScrolling Graphs Plot and Line FunctionSingle-Variable and Two-Variable Statistics Process Capability Probability Distribution 1-Var Data Correcting Statistical DataQuad Regression CalculationNegative Expressions Basic Arithmetic Operations for BasesLogical Operation Program Control Instructions Before Using the Program AreaInput memory variable END Relational Operators Creating a New ProgramExecuting a Program Deleting a Program Using the Graph Function in ProgramsDisplay Result Command Debugging 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