Sumilion
2006-09-21 12:08:32
As a iny tiny intro, standards are a sort of rules that you set up yourself, to make your script look better. As an example you could have :
First i would like to say, that Standards is something personal. Not personal as in a diary :p but it's most likely that only you script like that.
Spaces like this allows you and others who read the script to read it faster and with more understanding. The same If without standards would look like :
Then there are the spaces, those are the hart of standards. Without any spaces it would look like… shit :) a good example of well space use would probably be Wizzups and Fawki's standards. They use spaces like a mad man :p, but it actually doesnt look that bad :)
See how the space gives a sort of character to the script. Tho, as you can see, they aren't keen on the capital thing :).
Final word : Design your own standards, not that you have to look at all of the scripts and don't do those standards :), if it works for you, then it's ok. These were just examples, but doesnt standards make life much easier :D.
[Lol] It doesnt affect the way the script works :spot: [/Lol]
If ( LoggedIn ) Then;
Begin
Procedure;
Procedure;
Repeat;
Procedure;
Until Not ( LoggedIn );
End;First i would like to say, that Standards is something personal. Not personal as in a diary :p but it's most likely that only you script like that.
Spaces like this allows you and others who read the script to read it faster and with more understanding. The same If without standards would look like :
if(loggedin)then
begin
procedure;
procedure;
repeat;
procedure;
until not(loggedin)
end;Which, in my opinion, looks way worse :). When i 'made' my standards ( it actually just popped out of nowhere ;)), i thought of a couple of things. One of those things would be capitals. I always use capitals in an If or a Repeat or End. I just think it makes it look better.Then there are the spaces, those are the hart of standards. Without any spaces it would look like… shit :) a good example of well space use would probably be Wizzups and Fawki's standards. They use spaces like a mad man :p, but it actually doesnt look that bad :)
Function ThereIsFire(var WhereX,WhereY:integer):boolean;
var
acc,ref : Extended;
var
XT, YT,times,tol : Integer;
begin
ref:=0.8; tol:=1;
for times:=1 to 4 do
begin
FindDeformedBitmapToleranceIn(Fire, XT, YT, MSCX-(25*times),MSCY-(25*times),MSCX+(25*times),MSCY+(25*times), tol, 2, True, acc);
if (acc >= ref) then
begin
WhereX:=XT;
WhereY:=YT;
Result := True;
if FawkiDebug then writeln('Found Fire');
Exit;
end;
ref := ref - 0.1;
tol:=tol+10;
wait(1);
end;
Result:=False;
if FawkiDebug then writeln('Couldnt Find Fire');
end;( borrowed from Ratz! :))See how the space gives a sort of character to the script. Tho, as you can see, they aren't keen on the capital thing :).
Final word : Design your own standards, not that you have to look at all of the scripts and don't do those standards :), if it works for you, then it's ok. These were just examples, but doesnt standards make life much easier :D.
[Lol] It doesnt affect the way the script works :spot: [/Lol]