This basically tests whether or not the variable MyStringList is nil or not.
It is also a good idea to adopt use of the FreeAndNil procedure which, as the name suggests, sets object references to nil as well as freeing the object. Otherwise subsequent calls to Assigned will give you incorrect results. HTH, Conor -----Original Message----- From: Stephen Bertram [mailto:StephenB@;ensynergy.co.nz] Sent: Thursday, 14 November 2002 11:44 a.m. To: Multiple recipients of list delphi Subject: RE: [DUG]: Testing for existence of TStringList if Assigned(MyStringList) then ..... -----Original Message----- From: Mark Howard [mailto:mhoward@;pslog.co.nz] Sent: Thursday, 14 November 2002 11:37 a.m. To: Multiple recipients of list delphi Subject: [DUG]: Testing for existence of TStringList Hi Sorry. Basic question. How do you test for the existence of a TStringList (for example) before reading from it - or do you just do a try...except? Mark --------------------------------------------------------------------------- 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/ --------------------------------------------------------------------------- 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/ --------------------------------------------------------------------------- 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/