Hello There, Guest! Login or Register


Code Policy
#12
My personal preference is closest to the K&R style nowadays, with spacing like in [Griffin]'s example:

Code:
public SomeCallback ()
{ // Opening function brace on a new line
    for (new i = 0; i < SLOTS; i++) { // Opening brace on the same line in control structures
        if (!IsPlayerConnected (i)) continue; // No braces around single statements such as these

        SendClientMessage (i, COLOR_WHITE, "Hello there!");
        DoSomeMoreStuff ();
    }

    // Note the use of empty lines for clarity
    return 1;
}

I'm fine with pretty much anything though, as long as everybody follows the same conventions.


Messages In This Thread
Code Policy - by Fireburn - 08-26-2009, 03:38 PM
Re: Code Policy - by Matthias - 08-26-2009, 05:02 PM
Re: Code Policy - by [Griffin] - 08-26-2009, 06:57 PM
Re: Code Policy - by Matthias - 08-26-2009, 07:00 PM
Re: Code Policy - by Jay - 08-26-2009, 07:59 PM
Re: Code Policy - by Wesley - 08-26-2009, 08:06 PM
Re: Code Policy - by Matthias - 08-26-2009, 08:12 PM
Re: Code Policy - by Wesley - 08-26-2009, 08:17 PM
Re: Code Policy - by Badeend - 08-27-2009, 12:28 AM
Re: Code Policy - by [Griffin] - 08-27-2009, 06:22 AM
Re: Code Policy - by Peter - 08-27-2009, 06:47 AM
Re: Code Policy - by Pugwipe - 08-27-2009, 01:18 PM
Re: Code Policy - by Felle - 08-27-2009, 06:09 PM
Re: Code Policy - by Fireburn - 09-05-2009, 10:52 PM
Re: Code Policy - by Jay - 09-06-2009, 12:24 AM
Re: Code Policy - by Pugwipe - 09-06-2009, 06:24 PM
Re: Code Policy - by Wesley - 09-07-2009, 07:30 PM
Re: Code Policy - by Pugwipe - 09-07-2009, 08:00 PM
Re: Code Policy - by Peter - 09-07-2009, 11:21 PM
Re: Code Policy - by Fireburn - 09-08-2009, 11:07 PM
Re: Code Policy - by [Griffin] - 09-09-2009, 03:30 AM