Subprograms which have the same name but different behaviour are declared as usual. This applies to both procedures and functions. According to the following criteria it has to be possible to choose exactly one procedure or function (resolution of overloading):
If in a function call several variants are valid the local variant (e.g., in the architecture`s declarative part) hides the variant which ranks higher in hierarchy (e.g., from a package). By giving the complete subprogram name and hierarchy one still access any desired variant (Qualified Expression).
Operators are different from simple functions in two ways:
It is important to consider the handling of operators as strings when declaring overloaded operators. Apart from that the overloading of operators is not different from that of functions and procedures.
In these examples only the declarations and calls of the overloaded subprograms are shown. Of course a subprogram definition has to be written for every declaration.