n3ss3s
2008-03-19 10:54:32
In this tutorial I will teach you how to make a proggie with "fences" on it's both sides which can be any kind of characters (I prefer -|| ), and the fences will remain their position even the values of the progress reports change, like trees chopped etc.
It isn't a big thing so it doesn't need too much explanation, so try to look at the Padr in the code, that's how I learnt it.
It isn't a big thing so it doesn't need too much explanation, so try to look at the Padr in the code, that's how I learnt it.
Program ProgrExample;
Var
a, b, c, i, ii: Integer;
Procedure ProgressReport;
Begin
Writeln('||----------- ProgressReport -----------||');
Writeln(Padr('||- A: '+IntToStr(A), 39)+ '-||');
Writeln(Padr('||- B: '+IntToStr(B), 39)+ '-||');
Writeln(Padr('||- C: '+IntToStr(C), 39)+ '-||');
Writeln('||--------------------------------------||');
End;
begin
ii := 1;
b := 1;
c := 1;
For I := 0 To ii Do
Begin
a := a + i - Round(a / 2);
b := b + Round(b + b / 2 * a);
c := c + 1 + c * c;
If I Mod 5 = 0 Then
ProgressReport;
ii := ii + 1;
Wait(250);
End;
end.