Icon Assigned

Unit: Internal

Available In: Client and Server Applications

function Assigned(Value: TObject): Boolean

function Assigned(Value: TClass): Boolean

function Assigned(Value: function of object): Boolean

function Assigned(Value: procedure of object): Boolean

function Assigned(Value: function): Boolean

function Assigned(Value: procedure): Boolean

function Assigned(const Value: array of <Type>): Boolean

Examples

The Assigned function returns whether the input parameter is nil or has been assigned a value. The input parameter must be an object instance, method reference (function or procedure of object), string, or array variable. The return value is a Boolean value.

Examples

var
   MyObject: TObject=nil;
begin
   X := Assigned(MyObject);  // X is False
   MyObject := TObject.Create;
   X := Assigned(MyObject);  // X is True
end
Image