Tests for a nil (unassigned) pointer or procedural variable.
Unit
System
Category
miscellaneous routines
function Assigned(const P): Boolean;
Description
Use Assigned to determine whether the pointer or procedure referenced by P is nil. P must be a variable reference of a pointer or procedural type. Assigned(P) corresponds to the test P<> nil for a pointer variable, and @P <> nil for a procedural variable.
Assigned returns False if P is nil, True otherwise.
Note: Assigned can't detect a dangling pointer--that is, one that isn't nil but no longer points to valid data. For example, in the code example for Assigned, Assigned won't detect the fact that P isn't valid.
不可以的,我也是刚查过帮助,看下面的例子(Delphi 的Demo)
var P: Pointer;
begin
P := nil;//(P = nil 但是没有Assigned)
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;