home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2000 #5 / Amiga Plus CD - 2000 - No. 5.iso / Tools / Dev / fpc / source / docs / refex / ex87.pp < prev    next >
Encoding:
Text File  |  2000-01-01  |  377 b   |  30 lines

  1. Program Example87;
  2.  
  3. { Program to demonstrate the Break function. }
  4.  
  5. Var I : longint;
  6.  
  7. begin
  8.   I:=0;
  9.   While I<10 Do 
  10.     begin
  11.     Inc(I);
  12.     If I>5 Then 
  13.       Break;
  14.     Writeln (i);
  15.     end;
  16.   I:=0;
  17.   Repeat
  18.     Inc(I);
  19.     If I>5 Then 
  20.       Break;
  21.     Writeln (i);
  22.   Until I>=10;
  23.   For I:=1 to 10 do
  24.     begin
  25.     If I>5 Then 
  26.       Break;
  27.     Writeln (i);
  28.     end;
  29. end.
  30.