Hp 38g Graphing Calculator Manuel d'utilisateur Page 169

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 228
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 168
Loop Commands
A programming structure allows a program to control how it
should execute depending on given conditions or the values
of particular arguments. The HP 38G has two kinds of control
structures;
® Branch structures.
• Loop structures
DO...UNTIL
...END
Do ... Until... End is a loop structure that executes the loop-
clause repeatedly until test-clause returns a true (nonzero) result.
Because the test is executed after the loop>clause, the loop-clause
is always executed at least once. Its syntax is;
DO loop-clause UNTIL test-clause END
WHILE...
REPEAT...
END
While ... Repeat... End is a loop structure that repeatedly
evaluates test<lause and executes loop<lause sequence if the test
is true. Because the test-clause is executed before the loop-
clause, the loop-clause is not executed if the test is initially false.
Its syntax is;
WHILE test-clause REPEAT loop-clause END
FOR I ...TO
...STEP
...END
FOR name=start-expression TO end-expression
STEP INCREMENT;
loop-clause END
Exeunple
FOR 1=1 to 300
STEP 30;
BEEP 800-H; .5:
END
BREAK Terminates loop.
Programming 8-17
Vue de la page 168
1 2 ... 164 165 166 167 168 169 170 171 172 173 174 ... 227 228

Commentaires sur ces manuels

Pas de commentaire