MQL4 Reference Language Basics Object-Oriented Programming Overload
OverloadWithin one class it is possible to define two or more methods that use the same name, but have different numbers of parameters. When this occurs, methods are called overloaded and such a process is referred to as method overloading. Method overloading is one of ways of polymorphism realization. Overloading of methods is performed according to the same rules as the function overloading. If the called function has no exact match, the compiler searches for a suitable function on three levels sequentially:
If there is no exact correspondence at all levels, but several suitable functions at different levels have been found, the function found at the least level is used. Within one level, there can't be more than one suitable function. See also |