t71_repeat_seq.pas 530 B

123456789101112131415161718192021
  1. program t71_repeat_seq;
  2. { t71 -- a REPEAT body with more than one statement. This was a parser bug:
  3. the body called Statmnt once and then demanded UNTIL, so
  4. repeat a; b until c
  5. was ENoSemi at the first ';'. t12_repeat's two bodies are single
  6. statements, so nothing saw it; CALC.INC's Flash does (GotoXY; Blink := not
  7. Blink; if ...; Write; Delay). Red before the fix (ERR 1), green after. }
  8. var
  9. i : integer;
  10. begin
  11. i := 0;
  12. repeat
  13. i := i + 1;
  14. i := i + 1
  15. until i >= 6;
  16. writeln (i)
  17. end.