Hp 48g Graphing Calculator Bedienungsanleitung Seite 418

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 612
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 417
Loop structures let a program execute a sequence of commands several
times. To specify in advance horn' many times to repeat the loop, use a
definite loop. To use a test to determine whether or not to repeat the
loop, use an indefinite loop.
START...NEXT
Loop Structures
Enter this structure into a program by pressing fPRG) B K C H
T. Its syntax is;
.start finish STF loop-clause NEKl
29
START...NEXT executes the loop-clause sequence of commands one
time for each number in the range start to finish. The loop-clause is
alwfa,ys executed at least once.
START takes two numbers {start and finish) from the stack and stores
them as the starting and ending values for a loop counter. Then, the
loop-clause is executed. NEXT increments the counter by 1 and tests
to see if its value is less than or equal to finish. If so, the loop-clause
is executed again—otherwise, execution resumes following NEXT.
START-STEP
Enter this structure into a program by pressing (PRGl EFiCH
®ST ART. Its syntax is:
s ... .start finish START loop-clause
increment STEP ... s-
START...STEP executes the loop-clause sequence just like
START...NEXT does—except that the program specifies the
increment value for the counter, rather than incrementing by 1. The
loop-clause is always executed at least once.
START takes two numbers {start and finish) from the stack and stores
them as the starting and ending values of the loop counter. Then
the loop-clause is executed. STEP takes the increment value from
the stack and increments the counter by that value. If the argument
of STEP is an algebraic or a name, it’s automatically evaluated to a
number.
The increment value can be positive or negative. If it’s positive, the
loop is executed again if the counter is less than or equal to finish. If
29-12 Programming the HP 48
Seitenansicht 417
1 2 ... 413 414 415 416 417 418 419 420 421 422 423 ... 611 612

Kommentare zu diesen Handbüchern

Keine Kommentare