[Lazarus] Redundant assigned(X) and (X is Txxx) in Laz. sources
Mattias Gaertner
nc-gaertnma at netcologne.de
Sat Jan 13 08:47:51 CET 2018
On Sat, 13 Jan 2018 13:01:33 +0800
Dennis via Lazarus <lazarus at lists.lazarus-ide.org> wrote:
>[...]
> I am now confused, so
> in FPC, it is safe to just use: if LookupRoot is TWinControl
> instead of
> if assigned(LookupRoot) and (LookupRoot is TWinControl) then ....
Yes.
> is it safe to
> with LookupRoot as TWinControl do begin
> ....
> end;
No.
> or should I always
> if assigned(LookupRoot) then
> with LookupRoot as TWinControl do begin
> ....
> end;
Yes.
Mattias
More information about the Lazarus
mailing list