Personally I find
if blah then begin
DoStuff
end
easier to read.
Robert Martin
Software Engineer
Wild Software Ltd
----- Original Message -----
From: "Mark Howard" <[EMAIL PROTECTED]>
To: "Multiple recipients of list delphi" <[EMAIL PROTECTED]>
Sent: Wednesday, September 19, 2001 10:49 AM
Subject: Re: [DUG]: Help with Logic flows
> Ok
>
> Thanks for all suggestions.
>
> the practice of departmentalising (or encapsulating - to use a less buzzy
> word) some of the logic allowed me to move a sub-nest (if..then..else) to
a
> seperate procedure and to see the logic more clearly.
>
> Neven's "case..." example looks very neat but *this* "programmer" will
need
> to study it in a lot more detail to be able to understand how to use it.
>
> BTW any preferences for "begin end" layout?
> if blah then
> begin
> DoStuff
> end
>
> or
>
> if blah then begin
> DoStuff
> end
>
> Mark
>
>
> ----- Original Message -----
> From: "Robert Martin" <[EMAIL PROTECTED]>
> To: "Multiple recipients of list delphi" <[EMAIL PROTECTED]>
> Sent: Wednesday, September 19, 2001 10:26 AM
> Subject: Re: [DUG]: Help with Logic flows
>
>
> > Tottally agree Paul. Always using begin... end makes errors far less
> common
> > and your code much more readable. We use 4 space tabs, which both makes
> > tabbing very obvious and also serves to discourage extremely nested ifs.
> >
> > Robert Martin
> > Software Engineer
> > Wild Software Ltd
> > ----- Original Message -----
> > From: "Paul Mostek" <[EMAIL PROTECTED]>
> > To: "Multiple recipients of list delphi" <[EMAIL PROTECTED]>
> > Sent: Wednesday, September 19, 2001 1:28 AM
> > Subject: Re: [DUG]: Help with Logic flows
> >
> >
> > > Mark,
> > > Don4t be worried !
> > > It4s very simple to develop complex algorithms
> > > without lose your head.
> > > First of all, you must be used to use indentation.
> > > I use indentation of 3 blank spaces. It4s visually
> > > more confortable do follow a logical sequence with a
> > > good indentation !
> > > Second: Allways use BEGIN and END, even when around
> > > only one line of code.
> > > Third: Immediately after open a BEGIN statement you
> > > must close the END statement. This eases the process
> > > of non forgetting the END...
> > > Fourth: When you have a very complex sub-algorithm
> > > inside another complex algorithm, you must consider
> > > the possibility of encapsulating this sub-algorithm
> > > inside a procedure or function...
> > > I hope these simple tips help you to solve your
> > > problem...
> > >
> > > Paul Mostek
> > >
> > >
> > >
> >
>
> --------------------------------------------------------------------------
> > -
> > > New Zealand Delphi Users group - Delphi List -
[EMAIL PROTECTED]
> > > Website: http://www.delphi.org.nz
> > > To UnSub, send email to: [EMAIL PROTECTED]
> > > with body of "unsubscribe delphi"
> > > Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
> > >
> >
>
> --------------------------------------------------------------------------
> -
> > New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
> > Website: http://www.delphi.org.nz
> > To UnSub, send email to: [EMAIL PROTECTED]
> > with body of "unsubscribe delphi"
> > Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
> >
>
> --------------------------------------------------------------------------
-
> New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
> Website: http://www.delphi.org.nz
> To UnSub, send email to: [EMAIL PROTECTED]
> with body of "unsubscribe delphi"
> Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
>
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED]
with body of "unsubscribe delphi"
Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/