Any Type
A variable of type Any can contain an object reference or any primitive value.
The Any primitive type can be used only for local variables, parameters, and return types. You cannot define a property of type Any.
To determine the type of the value associated with a variable of type Any
-
Use the isKindOf method.
The Any primitive type is useful when a:
-
Method can return either an object reference or primitive value
-
Parameter in a method can be either an object reference or a primitive value
-
Variable can receive either an object reference or a primitive value
The following example shows the use of the Any primitive type.
userNotification(eventType: Integer; userInfo: Any); vars file : DbFile; begin if eventType = 19 then file := userInfo.DbFile; ... endif; end;
For details about the methods defined in the Any primitive type, see "Any Methods", in the following subsection.
For details about converting primitive types, see "