Is there a simple way to tell if slTest has been assigned in the following ?

(without specifically assigning it to NIL in the declaration)

var
  slTest        :TStringList;

begin
  if Assigned(slTest) then FreeAndNil(slTest); // gives exception
end;

Thanks - SteveG




--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to