On 27/05/2010 10:13, Marco van de Voort wrote:
On Thu, May 27, 2010 at 09:51:48AM +0200, Michael Schnell wrote:
I'm a fan of "half-indentation", showing clearly as well the
alternatives, as the start and end of the block of choices, while saving
lines.
With "else" I practically always do "end else begin" to make things more
clear. (Code templates are nice :) )

if x then begin
   code
  end else begin
   if y then begin
     code
    end else begin
     code
   end;
end;
I always put begin,else,end on newlines. If they were not important they
would be omitted.
That is a strange argument... "important" => line of their own

Now before I take part in this hijacked thread (it was about highlighting, not indent). IMHO the exact style ot intend is mostly a matter of taste. Wahtever you grew up with (or are used too), seems most readable. Besides this, there is pro and contra for all the styles, and no scientific correct choice.

But as for you saying, I couldn't resist a bit of a sarcastic answer.

To me each word (keyword, identifier, or else), each bracket, comma, *semicolon*, assignment or other operator => they are all important. Yet I don't put them all on individual lines....

Martin

--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to