shadowrecon Posted January 13, 2012 Share Posted January 13, 2012 Okay so im trying to get the formatting correct so everything looks a bit more uniform, would come one take a look at this function and tell me if its in the proper format? Procedure ChangeDir; Var CurrentPos: Extended; begin CurrentPos := Round(GetCompassAngleDegrees); Status('Your Current Angle is ' + FloatToStr(CurrentPos)); if ((CurrentPos < 270) and (CurrentPos > 90)) then begin MakeCompass(Dir_North); end; if ((CurrentPos > 270) or (CurrentPos < 90)) then begin MakeCompass(Dir_South); end; end; or does it need to look like this.. Procedure ChangeDir; Var CurrentPos: Extended; begin CurrentPos := Round(GetCompassAngleDegrees); Status('Your Current Angle is ' + FloatToStr(CurrentPos)); if ((CurrentPos < 270) and (CurrentPos > 90)) then begin MakeCompass(Dir_North); end; if ((CurrentPos > 270) or (CurrentPos < 90)) then begin MakeCompass(Dir_South); end; end; i just get lost on the ifs, where and when do i tab Quote Link to comment Share on other sites More sharing options...
Neron Posted January 13, 2012 Share Posted January 13, 2012 Read this : http://www.sourceformat.com/coding-standard-pascal-gnu.htm Quote Link to comment Share on other sites More sharing options...
shadowrecon Posted January 13, 2012 Author Share Posted January 13, 2012 Read this : http://www.sourceformat.com/coding-standard-pascal-gnu.htm i just skimmed through all that, and with hardly any luck did it explain the if statements, and if that are brought back to the same line or pushed further out. id just like a simple yes or no on one of those examples. would help out greatly! =) Also another question is there a way to initialize and set up a variable at the same time like in C it was used like so: int blah = 0; this way its defined and set to a value at the same time as im having to define some variables to what i want them to be when if i could only initialize them and and set them it would save lines =) Quote Link to comment Share on other sites More sharing options...
rsutton Posted January 13, 2012 Share Posted January 13, 2012 Formatting is what you make it. You cant make variables like this I believe. Along time ago I asked freddy about it and it came up where it has to be initilized first. Though the new engine will allow this I believe is what he said. Quote Link to comment Share on other sites More sharing options...
FHannes Posted January 13, 2012 Share Posted January 13, 2012 I've yet to write official formatting standards for SCAR scripts =/ Quote Link to comment Share on other sites More sharing options...
Bixby Sayz Posted January 13, 2012 Share Posted January 13, 2012 Wanted posted a nice guide to OSI scripting standards. I don't 100% agree with all his decisions but it's a good starting point. http://wiki.scar-divi.com/osi/index.php?title=Official_OSI_Standards Quote Link to comment Share on other sites More sharing options...
shadowrecon Posted January 13, 2012 Author Share Posted January 13, 2012 Gah some many different ideas! lol. hard to stick to just one, i think im going to just do what ive always done after each function double space until end of function then go back to main header element and restart.. atleast until there is standard set by someone =) Quote Link to comment Share on other sites More sharing options...
rsutton Posted January 13, 2012 Share Posted January 13, 2012 I Think my idea is best. Just make it. Quote Link to comment Share on other sites More sharing options...