Musterlösung zu "Zähle von 1 bis 100"

MODULE zaehle;

IMPORT Display;

PROCEDURE ProgMain*;
VAR i: INTEGER;
BEGIN
     FOR i := 1 TO 100 
          DO Display.WriteInt (i,3);
     END;
     REPEAT UNTIL Display.KeyPressed();
END ProgMain;

END zaehle.

Variante "Countdown"

MODULE countdown;

IMPORT Display;

PROCEDURE ProgMain*;
VAR i: INTEGER;
BEGIN
     FOR i := 1 TO 100 
          DO Display.WriteInt (i,3);
     END;
     REPEAT UNTIL Display.KeyPressed();
END ProgMain;

END countdown.

Zurück zur Wiederholung bei bekannter Anzahl der Durchläufe