On Sunday 31 December 2006 00:07, Lee Jenkins wrote:
> Micha Nelissen wrote:
> > Lee Jenkins wrote:
> >>> repeat;
> >>>  begin
> >>>  ReadLn(sRead);
> >>>  bDone := self.ProcessSingleVar(sRead);
> >>>  end;
> >>> until (bDone);
> >>
> >> LOL.  Just makes it more readable for me.  When I have to come back to
> >
> > The above is more readable than the following to you ? (Just asking)
> >
> > repeat
> >   ReadLn(sRead);
> >   bDone := self.ProcessSingleVar(sRead);
> > until bDone;
> >
> > - no semicolon after repeat
> > - no begin/end pair within repeat/until
> > - no parenthesis needed for simple expression after until.
> >
> > Micha
>
> Either one, actually.  The first is just the way that I started using
> pascal (delphi) and it stuck.  You may remove the extraneous lines if
> they offend you ;)
>
> Also, a lot of people will using this:
>
> For i := 0 to 99 do begin
>     // some stuff
>    end;
>
> While I prefer
>
> For i := 0 to 99 do
>    begin
>    // do some stuff
>    end;

I much prefer

for X := 0 to 99 do
begin
  FooStuff();
end;

I used to Capitalize keywords too, but I've never only capitalized the first 
keyword in a block - that's pretty obscure to me :)

for ... begin is pretty bad for me, too - as well as indenting the begin-end 
pair.

For reference, we've put together a style guide for our project, which can be 
seen here:

https://technetium.dk/cgi-bin/trac.cgi/wiki/Tc/CodingStyle

It's not done yet, but perhaps someone will be inspired by it, or offer 
critique :)

-- 
Regards,
Christian Iversen

_________________________________________________________________
     To unsubscribe: mail [EMAIL PROTECTED] with
                "unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to