Parameter data types that differ only by extent
- Last Updated: March 30, 2020
- 1 minute read
- OpenEdge
- Version 12.2
- Documentation
Parameter data types differing by extent (arrays) typically match strictly according to scalar type and extent. However, if the method is called using a parameter with a fixed extent, and no method exists that matches a corresponding parameter with that fixed extent, the call can be resolved by a method definition whose corresponding parameter has an indeterminate extent. In any case, failure to find a match raises a compile-error.
The examples that follow show how different calls to overloaded methods (or constructors) with parameters of the same data type, but with different extents, are resolved:
|
When the following procedure calls the setVal( ) method
with a given parameter, the overloaded method definition that it matches
corresponds to the bold-faced number referenced in the comments:
|