Alistair

As far as I can see the two expressions are the same, in fact the brackets
in this case are redundant

ie you could write

if DateSwitch and not RxCheckListBox6.Checked[2] then
CheckFileExist(VCLzip1.zipname);

Not knowing the exact details there are situations where you can get in
trouble with
Delphi Short circuiting its boolean eval, ie if DateSwitch was a function
that performed some other
operation and you relied on that to be called

HTH

Neven

----- Original Message -----
From: "Alistair George" <[EMAIL PROTECTED]>
To: "Multiple recipients of list delphi" <[EMAIL PROTECTED]>
Sent: Monday, March 10, 2003 1:12 PM
Subject: [DUG]: coding


> Hi All.
> The following:
> if (DateSwitch) and not (RxCheckListBox6.Checked[2]) then
CheckFileExist(VCLzip1.zipname);
> is not parsed correctly unless it is:
> if (DateSwitch) and (not RxCheckListBox6.Checked[2]) then
CheckFileExist(VCLzip1.zipname);
>
> So does this mean that any boolean thusly declared:
>
> If not _acorrecttest_ then showmessage('Always false');
>
> //above is wrong but
>
> if (not _acorrecttest_) then showmessage('sometimes false');
>
> --------------------------------------------------------------------------
-
>     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/

Reply via email to