HP 15C Uživatelský manuál Strana 110

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 288
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 109
110 Section 10: The Index Register and Loop Control
For example, the number 0.05002 in a storage register represents:
nnnnn x x x y y
0.0 5 0 0 2
Start count at zero. Count by twos.
Count up to 50.
I and e Operation. Each time a program encounters I or
e it increments or decrements nnnnn (the integer portion of the loop
control number), thereby keeping count of the loop iterations. It compares
nnnnn to xxx, the prescribed test value, and exits the loop by skipping the
next line if the loop counter (nnnnn) is either greater than (I) or less
than or equal to (e) the test value (xxx). The amount that nnnnn is
incremented or decremented is specified by yy.
With these functions (as opposed to the other conditional tests), the rule is

False (nnnnn xxx)
True (nnnnn > xxx)
instruction
´IV
loop
t. 1
instruction
exit loop
For I: given nnnnn.xxxyy, increment nnnnn to nnnnn + yy, compare
it to xxx, and skip the next program line if the new value satisfies nnnnn >
xxx. This allows you to exit a loop at this point when nnnnn becomes
greater than xxx.
Zobrazit stránku 109
1 2 ... 105 106 107 108 109 110 111 112 113 114 115 ... 287 288

Komentáře k této Příručce

Žádné komentáře