Assigned function
Check if a pointer is valid.
Declaration
function Assigned(P: Pointer): BooleanDescription
Assigned returns
True if
P is non-nil
and returns
False of
P is nil.
The main use of Assigned is that Procedural variables, method variables and
class-type variables also can be passed to
Assigned.Errors
None
See also
Example: ex96
Program Example96;
{ Program to demonstrate the Assigned function. }
Var P : Pointer;
begin
If Not Assigned(P) then
Writeln ('Pointer is initially NIL');
P:=@P;
If Not Assigned(P) then
Writeln('Internal inconsistency')
else
Writeln('All is well in FPC')
end.An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
