Demonstrates how to use REPEAT-UNTIL loop in Delphi

Demonstrates how to use REPEAT-UNTIL loop in Delphi

Demonstrates how to use REPEAT-UNTIL loop in Delphi

Simple Borland Delphi tutorial demonstrate how to do REPEAT-UNTIL LOOP. Simple form button click event run the REPEAT-UNTIL LOOP.

DownloadDownload This Tutorials

Bookmark:

Demonstrates how to use REPEAT-UNTIL loop in Delphi

This example demonstrates how to use REPEAT-UNTIL loop in Delphi.

Click RUN button to execute the REPEAT-UNTIL loop.

procedure TForm1.Button2Click(Sender: TObject);
Var
    V1, V2 : Variant;
    N1, N2, Count : Integer;
begin
    { Clear the memo before adding numbers }
     Memo1.Lines.Clear;
     V1:=Edit1.Text;
     V2:=Edit2.Text;
     { Convert variant to integers }
      N1:=Integer(V1);
      N2:=Integer(V2);
     { Set Count to a starting No. }
     Count:=N1;
     { Use Repeat - Until loop to add numbers to memo }
     Repeat
         Memo1.Lines.Add(IntToStr(Count));
        { Increase the count variable 1 by 1 }
         Inc(Count);
     Until Count>N2
end;

Download This Delphi Tutorials.

Download materials for this article (Delphi - Tutorials)

Download - Repeat-Until-loop.zipRepeat-Until-loop.zip
       File size: 4 KB, File type: zip
       Total downloads: 269, Upload date: February 02 - 2009

christine :: April 01-2009 :: 05:31 AM

thanks 4 everything..:)

vishnu :: August 17-2009 :: 11:45 AM

 good good good good

Leave a comment