I'm not saying trying to turn this into "I'm right your wrong" thing,
because it comes down to personal preference I guess, but here is what I was
talking about, taken from Delphi 4 Developers Guide by Steve Teixeira and
Xavier Pacheco.
<SNIP>
OBJECT PASCAL
Parenthesis
There shall never be white space between an open parenthesis and the next
character. Likewise, there shall never be white space between a closed
parenthesis and the previous character. The following example illustrates
incorrect and correct spacing with regard to parentheses:
CallProc( AParameter ); // incorrect
CallProc(AParameter); // correct
Never include extraneous parentheses in a statement. Parentheses should only
be used where required to achieve the intended meaning in source code. The
following examples illustrate incorrect and correct usage:
if (I = 42) then // incorrect - extraneous parentheses
if (I = 42) or (J = 42) then // correct - parentheses required
</SNIP>
-----Original Message-----
From: Patrick Dunford [mailto:[EMAIL PROTECTED]]
Sent: Thursday, 15 June 2000 19:15
To: Multiple recipients of list delphi
Subject: RE: [DUG]: Strange compiler error
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
> Behalf Of James Sugrue
> Sent: Thursday, 15 June 2000 14:14
> To: Multiple recipients of list delphi
> Subject: RE: [DUG]: Strange compiler error
>
>
> Works fine for me.
>
> BTW You do realise you can have
>
> if MessageDlg('Are you sure you want to delete this book?',mtConfirmation,
> [mbYes,mbNo],0) = mrNo then
> abort;
>
> I think I have also read somewhere that it is not recommended to
> encase the
> if statements in () if you can help it. I am open for verification on that
> one though.
I think you are wrong.
The coding style I have used is based on one that is designed to improve the
clarity of coding. I am not a C programmer.
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz
CAUTION - This message may contain privileged and confidential information intended
only for the
use of the addressee(s) named above. If you are not the intended recipient of this
message you are
hereby notified that any use, dissemination, distribution or reproduction of this
message is prohibited.
If you have received this message in error please notify Progressive Enterprises Ltd.
immediately via
email at [EMAIL PROTECTED] Any views expressed in this message
are those of the
individual sender and may not necessarily reflect the views of Progressive Enterprises
Ltd.
This footnote also confirms that Progressive Enterprises Ltd. has swept this email
message for the
presence of computer viruses. This does not guarantee this message is virus free.
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz