Won't this crash if DataSet = nil? In that case the compiler won't be able
to check if Connection is assigned or not.

-----Original Message-----
From: Sandeep [mailto:[EMAIL PROTECTED]]
Sent: Friday, 2 November 2001 12:19 pm
To: Multiple recipients of list delphi
Subject: Re: [DUG]: Best practice - To except or not


This is better

  if Assigned (Datasource.DataSet.Connection)
  then Result := Datasource.DataSet.Connection;
---------------------------------------------------------------------------
    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