Paul

Thanks for the help, It would be great it assigned() worked wouldn't it
Maybe there is a suggestion for borland in there

This leads to another question, is 'assigned()' pref to '<> nil'?, is
pred(count) better thasn Count-1?

Actually thats inc(1) questions, or was that 1+1 questions

It must be friday

Neven


----- Original Message -----
From: "Paul Heinz" <[EMAIL PROTECTED]>
To: "Multiple recipients of list delphi" <[EMAIL PROTECTED]>
Sent: Friday, November 02, 2001 2:53 PM
Subject: RE: [DUG]: Best practice - To except or not


> Sandeep wrote:
>
> > > > This is better
> > > >
> > > >   if Assigned (Datasource.DataSet.Connection)
> > > >   then Result := Datasource.DataSet.Connection;
> > >
> > >
> > > if Datasource.Dataset is nil won't this raise
> > > an exception?
> >
> > Conditon evaluates to false in that case
>
> In Delphi 5, you get an access violation since Assigned only tests the
final
> deref not the early one. Maybe it's changed in Delphi 6.
>
> 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/
>

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