PDA

View Full Version : How to make a "fenced proggie"



n3ss3s
03-19-2008, 02:54 PM
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.
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.

smithsps
03-19-2008, 03:06 PM
Nice i plan on using this very much because it looks so nice.

Nice Tut:)

Naike
03-19-2008, 03:59 PM
xD I really don't think all people will understand this!

Good tut tho ;)

mastaraymond
03-19-2008, 05:55 PM
This is not a tutorial :p

n3ss3s
03-19-2008, 06:22 PM
I have a defence - there are more of these! (http://www.villavu.com/forum/showthread.php?t=)

Though yea - I hate the idea about a tutorial this short, but how can you explain it better? For loops in scripts adding spaces to a string is just plain gay since there is a function for it already.

Harry
03-19-2008, 06:41 PM
I think you learned these from my caver :p I used them and you posted somewhere "Hmm nice, I will use the padding too" ;)

Nice tut anyways.

n3ss3s
03-19-2008, 07:00 PM
http://support.alphasoftware.com/alphafivehelpv8/Functions/PADR().htm

mastaraymond
03-19-2008, 09:02 PM
I have a defence - there are more of these! (http://www.villavu.com/forum/showthread.php?t=)

Though yea - I hate the idea about a tutorial this short, but how can you explain it better? For loops in scripts adding spaces to a string is just plain gay since there is a function for it already.
Make it contain all the kind of string functions?

EvilChicken!
03-19-2008, 11:00 PM
Thanks for this "tut" :p
I saw them in Hy's caver, but you made me think about this function again, I'll use them in my scripts. Are there any other things Padr can be used for?

KoKouKo
03-20-2008, 01:19 AM
MK's pcer's fightn report is a really good example of this

[offtopic]i got a 43 hour proggie with his script (too bad he closed the script the day i started using it)

mastaraymond
03-20-2008, 12:14 PM
Thanks for this "tut" :p
I saw them in Hy's caver, but you made me think about this function again, I'll use them in my scripts. Are there any other things Padr can be used for?
There are some other versions of it that pad it up with 0000's and another one, but I forgot :p. You can use this to display only a part of the extended value's.. But its not really a good use xD

n3ss3s
03-20-2008, 01:07 PM
Make it contain all the kind of string functions?


I made one before, which excluded Padr, Padl, Padz and Regex, you can merge the tuts and finish if you want to? :)