You are wrong. In fact, they both will generate the same code if short-circuit Boolean expression evaluation is used (equals to "{$B-}").Originally Posted by User137
Again, you are wrong if "{$B-}" is used (by default). In fact, if you are accessing an object (e.g. "if (obj.position.x = 25) then") and suspect that it can be nil, you can add "obj <> nil" comparison before the initial condition (e.g. "if (obj <> nil)and(obj.position.x = 25) then") to be sure.Originally Posted by User137
Of course, if you use complete Boolean expression evaluation (equals to "{$B+}"), your points are valid. I've never seen any Pascal code using complete Boolean evaluation though.
Bookmarks