On Wed 30 May 2001 16:12, Dave Mitchell <[EMAIL PROTECTED]> wrote:
> > > "K&R" style for indenting control constructs: ie the closing C<}> should
> > > line up with the opening C<if> etc.
> > > 
> > > =item *
> > > 
> > > When a conditional spans multiple lines, the opening brace must line up
> > > with the "if" or "while", or be at the end-of-line otherwise.
> > 
> > I certainly will not change existing code that's written like this, but - 
> since
> > IMHO this is *poor* GNU coding style - I will submit /new/ code snippets
> > formatted my own way: the right way. It's then up to the pumpking to accept or
> > reject it.
> 
> The above two are essentially just rehashes of what's already in
> Porting/patching.pod, and seems to reflect existing practice (loosely
> speaking).
> 
> What do you regard as the 'right' way?
> 
> Just to check you're not being mislead by poor wording, the above is
> supposed to propose
> 
> if (...) {
>     ...
> }

if (func (arg)) {
    :
    }

> and
> 
> if (...
>     .....
>     .....)
> {
>     ....
> }

if (...
    ...
    ...) {
    :
    }

But I know I'm rather alone on this, though I'm not just someone saying: "Cause
that looks nice". I have several reasons for dong so and can defend my stance.

-- 
H.Merijn Brand    Amsterdam Perl Mongers (http://www.amsterdam.pm.org/)
using perl-5.6.1, 5.7.1 & 626 on HP-UX 10.20 & 11.00, AIX 4.2, AIX 4.3,
     WinNT 4, Win2K pro & WinCE 2.11 often with Tk800.022 &/| DBD-Unify
ftp://ftp.funet.fi/pub/languages/perl/CPAN/authors/id/H/HM/HMBRAND/

Reply via email to