The repeat loop in Pascal is the equivalent of the do loop in VB and is coded as in the following example.
repeat inc(i); readln(Name[i]); until Name[i] = 'End';
For EvenNum = 2 To 10 Step 2 Console.WriteLine(EvenNum) Next EvenNumuse the Pascal code
for Count := 1 to 5 do begin EvenNum := Count * 2; writeln(EvenNum); end;
In order to count down, say from 4 to 1, instead of the VB code
For Count = 4 To 1 Step -1
use the Pascal code
for Count := 4 downto 1 do.
while not eof(TFile) do begin read(TFile, CurrentString); writeln(CurrentString); end;