assigned 判断指针是否为空,空返回假
ptr:=GetMem(SizeOf(testrecord));
if not Assigned(ptr) then
begin OutputDebugString(‘ nil‘); end;
delphi assigned
原文:https://www.cnblogs.com/fply/p/14295594.html