-
Notifications
You must be signed in to change notification settings - Fork 0
Subprogram
Samman Bikram Thapa edited this page Apr 27, 2017
·
2 revisions
Number of parameters, Type of parameters, Order of parameters
Parameter Profile + return Type
An overloaded subprogram is one that has the same name as another subprogram in the same referencing environment.
Every version of an overloaded subprogram must have a unique protocol; that is, it must be different from the others in the number, order, or types of its parameters, and possibly in its return type.
A generic subprogram is one whose computation can be done on data of different types in different calls.
Parametrically polymorphic subprograms are often called generics.
C++ template functions are instantiated implicitly either when the function is named in a call or when its address is taken with the & operation.