The statement, "If not xyz then" is correct.

Your problem is when you do multiple conditions, the test must result in
true or false, regardless of whether Boolean or a comparison, etc. and they
must be bracketed to get this effect. It makes perfect sense to me, that the
"not xyz" must be "(not xyz)" if there are multiple conditions to the IF.
It's just the way Delphi wants it.

My penny's worth.

Dave Jollie
Tower NZ IT
09 368 4259
 

-----Original Message-----
From: Alistair George [mailto:[EMAIL PROTECTED] 
Sent: Monday, 10 March 2003 1:13PM
To: Multiple recipients of list delphi
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