Programming
Techniques
13–17
File name 33s-English-Manual-040130-Publication(Edition 2).doc Page : 388
Printed Date : 2004/1/30 Size : 13.7 x 21.2 cm
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
t
N for the old–to–new system or
t
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)
Description:
Checksum and length: D548 9
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.
Is
B
<
new
A
?
Yes: loops to repeat subtraction.
No: displays new
A
.
Checksum and length: AC36 27
Содержание 33S
Страница 1: ... HP 33s scientific calculator user s manual H HP Part number F2216A 90020 Printed in China Edition 2 ...
Страница 14: ......
Страница 15: ...Part 1 Basic Operation ...
Страница 16: ......
Страница 56: ......
Страница 64: ......
Страница 82: ......
Страница 92: ......
Страница 122: ......
Страница 137: ...Operations with Complex Numbers 9 7 c Ù Adds L1 L2 L3 Converts vector back to polar form displays r θ ...
Страница 138: ......
Страница 157: ...Part 2 Programming ...
Страница 158: ......
Страница 184: ......
Страница 210: ......
Страница 222: ......
Страница 255: ...Mathematics Programs 15 33 y y x x m n New coordinate system Old coordinate system 0 0 x P u y v θ ...
Страница 293: ...Part 3 Appendixes and Reference ...
Страница 294: ......
Страница 324: ......
Страница 348: ......