Try OpenEdge Now
skip to main content
Object-oriented Programming
Overloaded Method and Constructor Calling Scenarios : Matching values of unknown data types to parameters
 

Matching values of unknown data types to parameters

When passing an expression of unknown data type (such as the BUFFER-VALUE attribute), the AVM only selects a method or constructor to invoke if the unknown data type causes no run-time ambiguity among overloadings. If the data type actually passed at run time does not allow the AVM to select a method or constructor, the AVM raises a run-time error. Similar to the Unknown value (?), you can avoid potential run-time errors with an expression of unknown data type by converting it to a known data type using a data type conversion function or by assigning it to a variable, data member, or property, then passing the converted value, variable, data member, or property as the parameter.