Type Compatibility

Syntax

	$objectType.isCompatible($variableType)

Description

Checks whether an object of type objectType can be assigned to a variable of type variableType. "Object" is not restricted to TLObjects but includes all types of objects, for example numbers. If objectType should be exactly variableType without potential subtypes, $objectType == $variableType can be used (vgl. Type of an object).

Parameter

Name Type Description Mandatory Default
objectType Type The type of an object that should, for example, be stored in a v ariable of type variableType. yes
variableType Type The type of, for example, a variable that should store objectType. yes

Return Value

Type: Boolean value

Example

	{
   objectType = new(`my.module:MyClass`);
   variableType = new(`my.module:OtherClass`);
   $objectType.isCompatible($variableType);
}