Quote Originally Posted by dmantione
Quote Originally Posted by jasonf
hmmm... I've been using

[pascal]if not (obj = nil)[/pascal]

is this slower than [pascal]if obj <> nil[/pascal] ?
This is an easy optimization, most compilers will generate the same code for both, including FPC. However, especially in complex bollean expressions, it can be good forr eadibility to remove some parenthesis.
Does it mean it is a better practice to place if's inside other if's, instead of using parenthesis? In example, this...

Code:
if a = b then
  if b = c then WriteLn&#40;'a = c!!'&#41;;
... is better than...

Code:
if &#40;a = b&#41; and &#40;b = c&#41; then WriteLn&#40;'a = c!!'&#41;;