Program linkage
Linkage determines whether identifiers that have identical
names refer to the same object, function, or other entity, even if
those identifiers appear in different translation units. The linkage
of an identifier depends on how it was declared. There are three types
of linkages:
- Internal linkage : identifiers can only be seen within a translation unit.
- External linkage : identifiers can be seen (and referred to) in other translation units.
- No linkage: identifiers can only be seen in the scope in which they are defined.
Beginning of C++ only.
You can have linkage between translation units written in different programming languages, which is called language linkage. Language linkage enables the close relationship among all ILE languages by allowing code in one ILE language to link with code written in another ILE language. In C++, all identifiers have a language linkage, which by default is C++. Language linkage must be consistent across translation units. Non-C or non-C++ language linkage implies that an identifier has external linkage. For IBM® i specific usage information, see "ILE Calling Conventions" in ILE C/C++ Programmer's Guide.
End of C++ only.