{
Assigned example
}

{$APPTYPE CONSOLE}

procedure TForm1.Button1Click(Sender: TObject);
var P: Pointer;
begin
  P := nil;
  if Assigned (P) then Writeln ('You won''t see this');
  GetMem(P, 1024);	{P valid}
  FreeMem(P, 1024);	{P no longer valid and still not nil}
  if Assigned (P) then Writeln ('You''ll see this');
end; 
