PDA

View Full Version : Guide to having perfect standards!



rj
03-12-2013, 08:30 PM
This is going to be a fairly simple guide on how to have perfect standards!

First of all, standards are ummm.. well the way your code is written.

Example of bad standards:

Program S;
Procedure HelloWorld;
Begin
Writeln('hello')
Begin
Writeln('hello hi')
End;
End;
Begin
HelloWorld;
End.

Example of good standards:

program S;

procedure HelloWorld;
begin
Writeln('hello')
begin
Writeln('hello hi')
end;
end;

begin
HelloWorld;
end.

Now how to do it via the extension:

Step 1) Go to Simba ---> View ----> Extensions, and enable formatter.sex

http://i50.tinypic.com/2w3wahj.png

Step 2) Now, to make your script look good go to parser ---> Format script

http://i49.tinypic.com/116ozev.png

Now your done! It is best that you learn how to use proper standards yourself without the extension, but if your just stuck it's better to use it then releasing a hard-to-read script! The secret to doing this is hitting "tab" after each begin and making sure each End; maches up with Begin!Post below if you have any questons

sinking
03-13-2013, 03:30 PM
Never knew there was an automatic formatter, thanks for the tip!

Sjoe
03-13-2013, 03:34 PM
Lol never knew off the formatter :)

litoris
03-13-2013, 03:36 PM
LOL I thought this was a complete guide before opening the thread, so I was just gonna troll it by saying Parser>Format script, but turns out that's the guide itself.

SomeGuyFromHere
03-15-2013, 08:05 PM
It deleted all comments in the code, making it very difficult to change things afterwards, especially if its a long script. Good standarts are fine but good looking isn't always the thing to go for... at least the result looks cryptic to me.