Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: The One True Style of indentation:

by mattr (Curate)
on Apr 15, 2002 at 10:40 UTC ( #159130=note: print w/ replies, xml ) Need Help??


in reply to The One True Style of indentation:

I use two spaces for manual indentation in Perl, and to continue a block of information in my own todo lists which are ascii, two newlines separating each block. It prints well and looks sane to me..

I use XEmacs which seems to get it right, tab eq 2 spaces. Personally I just find it to be the right amount, it generally leaves me enough room for short comments on the same line even when nested.

I learned curlies from Niklaus & Wurth but forget what they said.. I use

if (true) {
  woop;
} else {
  werp;
}

..Vertical real estate is important too. The real holy war is, how do you line up long || statements (over 2 lines for me)..

if ( (longthing > foo) || (anotherthing < moo) || (boo) ) { werp; }
Right??!?!?!? (smiling like jack n. in the shining) hee hee hah hah ahaha ahaa!!


Comment on Re: The One True Style of indentation:
Download Code
Replies are listed 'Best First'.
Re: Re: The One True Style of indentation:
by tretin (Friar) on Apr 15, 2002 at 12:43 UTC
    TAB's what it's all about. Easy to keep anything and everything lined up perfectly, and with a minimum of counting and such...

    work it harder make it better do it faster makes us stronger more than ever hour after our work is never over.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://159130]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (13)
As of 2015-07-31 15:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (279 votes), past polls