TYPE-OF function
- Last Updated: February 12, 2019
- 1 minute read
- OpenEdge
- Version 13.0
- Documentation
TYPE-OF is a built-in LOGICAL function that verifies that a specified object reference points to an
object that is defined as a specified class, inherits from a specified class, or implements
a specified interface.
This is the syntax for the TYPE-OF function:
|
Element descriptions for this syntax diagram follow:
- object-reference
- An object reference to any class or interface type.
- object-type-name
- The type name of a class or interface. This can be the fully qualified
object type name or the unqualified class or interface name, depending on the presence
of an appropriate
USINGstatement in the class or procedure file. For more information on object type names, see Define and reference object type names. For more information on theUSINGstatement, see Reference an object type name without its package.
The function verifies that the object referenced by the specified object-reference satisfies one of the following conditions:
- Matches the class or interface type specified by object-type-name
- Is a subclass of the class type specified by object-type-name
- Implements the interface type specified by object-type-name
If any of these conditions are valid, this function returns TRUE. If none are valid, this function returns FALSE. If object-reference
does not point to a valid object (see the ), the TYPE-OF
function returns the Unknown value (?).