Back to manual index

:: repeat and until

:: About = format as "until [variable name] [condition] [value]"
program RepeatExample;

const loopmax = 12;

var loop : integer;
    week1 : real;
    week2 : real;

begin

  loop := 0;

  repeat
    loop := loop + 1;
    week1 := week1 * 1.07;
    week2 := week2 * 1.08;
    writeln('Month ',loop:3,week1:9,week2:9);
  until loop = loopmax;

end.
:: Condition parameters :
=  is equal
!  is not equal
<> is not equal
$  is contains sub value (subset)
>  is greater than
<  is less than