Syntax:
IMPORTS importdefinitions
This statement defines the names of the functions imported for the application or library.
Note: The term import refers to the process of declaring that a symbol is defined in another run-time module (a dynamic-link library).
Typically, LINK386 uses an import library to resolve external references to dynamic-link symbols. However, the IMPORTS statement provides an alternative for resolving these references within a module.
The IMPORTS keyword marks the beginning of the import definitions. This keyword is followed by one or more import definitions, each on a separate line. Each import definition corresponds to a particular function.
Import-Definition Syntax
[internalname=]modulename.entry
<internalname>
Note: A given function has a name for each of three different contexts. The function has a name used by the exporting module (where it is defined), a name used as an entry point between modules, and a name as it is used by the importing module (where it is called). If neither module uses the optional <internalname> field, the function has the same name in all three contexts. If either of the modules uses the <internalname> field, the function may have more than one distinct name.
Syntax:
IMPORTS Sample.SampleRead SampleA.SampleWrite ReadChar = Read.1
This example defines three functions to be imported:
The functions are found in the modules Sample, SampleA, and Read, respectively. The function from the Read module is referred to as ReadChar in the importing module. The original name of the function, as it is defined in the Read module, may or may not be known.