Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CODING CONVENTIONS
- INDENTATION:
- -- Tabs should be used for all indentation.
- BRACES:
- -- Braces should appear at the end of the statement definition and on a new line after the function.
- -- i.e. public void someFunc() {
- -- doSomething();
- -- }
- WHITESPACE:
- -- No excess whitespace around parentheses. Example - use "while(x == y)" rather than "while (x == y)"
- -- No excess whitespace inside parentheses. Example - use "while(x == y)" rather than "while( x == y )"
- -- Use spaces around operators (except for i++ and i--) Example - use "a > 1" rather than "a>1".
- -- Use spaces after inline punctuation. Example 1 - use "a, b, c, d, e" rather than "a,b,c,d,e".
- COMMENTS:
- -- All comments should be meaningful in some way.
- -- Comments should appear above the line they are about.
- -- Comments should have a space after the //.
- -- New sections of code should be made clear with the following format
- -- ///////////////
- -- //SECTION TITLE
- -- ///////////////
- VARIABLE NAMES:
- -- Inside of functions, variable names do not have to follow conventions but must be somewhat meaningful (excluding counter variables), and must be consistent within the function.
- -- Global variables should be prefixed with "g_" and then a letter indicating what datatype it is:
- -- "m" for Menu
- -- "h" for Handle
- -- "b" for Bool
- -- "i" for Int
- -- "f" for Float
- -- "s" for String
- -- On global variables, the next letter, immediatly following the indicator, should be capitalized. Example - g_bMyBool or g_hMyHandle.
- -- Function names should start lowercase and use capital letters to signify new words.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement