- Page not found
CodingStandards
Indenting and Whitespace¶Use an indent of 2 spaces, with no tabs. Lines should have no trailing whitespace at the end. Files should be formatted with \n as the line ending (Unix line endings), not \r\n (Windows line endings). Operators¶All binary operators (such as +, -, !=, ==, ...) should have a space before and after the operator. Unary operators (like ++), should'nt have space between the operator and the variable. Control Structures¶For control structures (if, while, for, ...), an example will be more significant: if (condition1 || condition2)
{
do_something ();
}
else if (very_long_long_condition
&& another_condition)
{
}
else
{
}
Functions¶Like the control structures, place a space between the function name and the parenthesis: bar = foo (arg1, arg2); Place the variables declaration at the begening of the block function: public void foo ()
{
int a, b;
Gtk.TreeView tree_view;
tree_view = new Gtk.TreeView ();
}Miscellaneous¶
|



