It's not really a question of 'suspicion', really. ;-) It's all documented in the Delphi Help and various other places. Look up Operator Precedence Rules in the Delphi help for example.
Also, if you haven't come across it already, it's worth reading the section on Complete vs short-circuit Boolean evaluation as well. The reason your last example won't compile is simply that 'not' is an operator, not an expression. Cheers, Conor -----Original Message----- From: Allan, Samuel [mailto:[EMAIL PROTECTED] No. I tried: if true and not false then ShowMessage('Hi'); This works fine. So does if (true) and not (false) then ShowMessage('Hi'); However, if true and not then came up with a compile error. What I suspect that Delphi does is interpret the thing from left to right. So if A and B and C and D becomes: if (((A and B) and C) and D) if A and not B and C and D becomes: if (((A and (not B)) and C) and D) --------------------------------------------------------------------------- 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/
