[Lazarus] clarification / Re: constant-highlight ? [Re: quick opinion poll / pascal highlighting "case"]

Michael Schnell mschnell at lumino.de
Fri May 28 09:51:00 CEST 2010


On 05/27/2010 08:53 PM, Martin wrote:
> On 26/05/2010 06:06, Jürgen Hestermann wrote:
>> But why have an indentation after BEGIN? There is no new block to
>> start after BEGIN. I would indent like this:
>>
>> begin
>> if foo then
>>   begin
>>   bar := foo;
>
> Who is to say that the begin is part of the block? (Anyone is free to
> tread it as such, but where is it officially defined?)
>
In C this notation really look ridiculous: just a single
  {
in a line.

Funny: I do use a single "end;" (or "};" in C. (in fact always with a
";" even if this might not be totally "state of the art"). Perhaps it
would be even better to define the begin to be "outside" of the block
and the end to be "inside":

code 11
if x then begin
  code21;
  code22; end;
code 12;

looks really nice and consistently done to me right now, but I don't
remember to have ever seen this anywhere.

-Michael





More information about the Lazarus mailing list