Parameter data types that differ only by extent
- Last Updated: October 8, 2020
- 1 minute read
- OpenEdge
- Version 13.0
- Documentation
Parameter data types differing by extent (arrays) typically match strictly according to scalar type and size extent. However, if the method is called using a parameter with a fixed size, and no method exists that matches a corresponding parameter with that fixed size, the call can be resolved by a method definition whose corresponding parameter has an indeterminate array with no size. 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 sizes, 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:
|