JAWS Coding Guidelines
In order to keep our code consistent and pretty, please use the following guidelines.
* Indenting: Use an indent of 8 space tabs * If you are modifying someone else's code try to keep the coding style similar * C style comments (/* */) and standard C++ comments (//) are both fine. Use of Perl/shell style comments (#) is discouraged. * Please use // TODO: comment to indicate a missing implementation/feature * Tag your buggy code with the comment // FIXME: and the description of the problem * Use a descriptive introduction for any new files, example:
* index.php : index page for jaws<br/>
*<br/>
* Author: Jonathan Hernandez <ion@gluch.org.mx><br/>
*<br/>
* (c) 2004 JaWs<br/>
*/
$object->method($a);
$array[10] = 'foo';
//bad
$object->method( $a );
$array[ 10 ] = 'foo';
if ($a) {
foo ();
bar ();
}
// bad
if (a)
{
foo ();
bar ();
}
if ($a)
foo ();
//bad
if ($a) {
foo ();
}
class foo extends bar
{
function foo ()
{
// do something
}
}
// bad
class foo extends bar {
function foo () {
// do something
}
}
Happy coding! ![]()