HP F2216A hp 33s_user's manual_English_E_HDPM20PIE56.pdf - Page 201
Conditional Loops (GTO), Program lines, In RPN mode, Description
UPC - 082916014555
View all HP F2216A manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 201 highlights
This routine (taken from the "Coordinate Transformations" program on page 15-32 in chapter 15) is an example of an infinite loop. It is used to collect the initial data prior to the coordinate transformation. After entering the three values, it is up to the user to manually interrupt this loop by selecting the transformation to be performed (pressing X N for the old-to-new system or X O for the new-to-old system). Conditional Loops (GTO) When you want to perform an operation until a certain condition is met, but you don't know how many times the loop needs to repeat itself, you can create a loop with a conditional test and a GTO instruction. For example, the following routine uses a loop to diminish a value A by a constant amount B until the resulting A is less than or equal to B. Program lines: (In RPN mode) Checksum and length: D548 9 Description: It is easier to recall A than to remember where it is in the stack. . Calculates A - B. ! Replaces old A with new result. Recalls constant for comparison. º6¸@ Is B < new A? ! Yes: loops to repeat subtraction. #$ No: displays new A. ! Checksum and length: AC36 27 Programming Techniques 13-17