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 seldom do:

if x then begin
  code
 end else if y then begin
  code
 end else if z then begin
  code
end;

IMHO this looks quite nice, but as technically the last end is not the
match of the first end (as suggested by the indentation) I can't bring
myself to like it.

Michael

--
_______________________________________________
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to