Mathieu Roy <[EMAIL PROTECTED]> writes:

> Hi,
> 
> After discussion with the CERN team, we agreed to change this
> 
> function example () {
>         print "bla";
> }
> 
> if (1 != 1) {
>         print "blo";
> }
> 
> to
> 
> 
> function example () 
> {
>         print "bla";
> }
> 
> if (1 != 1) 
> {
>         print "blo";
> }
> 
> Which has the advantage of putting the corresponding { } on the same
> column. I think this is the GNU recommandation. If I'm mistaking,
> please tell me.

GNU coding style is not quite that, it would be better IMHO to use
GNU coding style which is this:


function example () 
{
   print "bla";
   if (1 != 1) 
     {
       print "blo";
     }
}
 
Top-level (ie: function) bodys are not indented, all other blocks are
indented. The indentation level is 2 spaces.

GNU coding style can be found online here:

http://www.gnu.org/prep/standards_toc.html

I recommend it.


Nic



Reply via email to