Sandeep wrote:

> This is better
>
>   if Assigned (Datasource.DataSet.Connection)
>   then Result := Datasource.DataSet.Connection;

I don't believe Assigned chases down all possible nils derefs, just the last
one.
If it does, it's news to me and not documented anywhere I can see.

It would indeed by a nice idiom, if it were true. You'd need to check the
assembler produced to see if all the nil tests are done for you.

TTFN,
  Paul.



---------------------------------------------------------------------------
    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