Glossary: Overloading
Overloading is the reuse of the same symbol or function name for two or more
distinct operations or functions. The concept turns up in FORTRAN
too, for example:-
1 + 2
1. + 2.
Here the plus sign stands for addition, but in the first example, the addition
is integer arithmetic whilst in the second it is floating point. As they both
perform the same logical operation, and the compiler can be relied on
to pick the appropriate physical operation, the overloading of the plus
sign is far better than inventing separate symbols for each physical
operation. In a similar way generic FORTRAN functions such as MAX stand for a
family of maximum functions, with the compiler selecting the right one
depending on context.
C++ extends the overloading concept, allowing the user to overload
both operators and functions, a powerful feature (for good and evil!)
See OO Concepts: Overloading
Go Back to the
The Glossary Top Page
If you have any comments about this page please send them to
Nick West