PML Customisation
User Guide
Variables, Objects, Functions and Methods
:
Methods on User-Defined Object Types
: Method Overloading
Method Overloading
Two or more methods on an object may share the same name providing they have different arguments. This is called
method overloading
. PML will invoke the method with the arguments which match the method call. It is common practice:
•
To use a method with the same name as a member and one argument of the same type to set the member’s value. For example:
!Marvin.Answer(65)
•
To use a method of the same name as a member returning a value of the same type but with no arguments to get the member’s value. For example:
!Number = !Marvin.Answer()
1974 to current year.
AVEVA Solutions Limited and its subsidiaries. All rights reserved.