[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
program @@fragment foo; |
The reserved word `import' in the import part of a program makes the program import an interface.
The `in' above tells GPC to look for the module in the specified file; otherwise the file name is derived from the name of the interface by adding first `.p', then `.pas' -- which only works if the name of the exported interface coincides with the file name.
The symbol `=>' denotes import renaming: The entity which is exported under the name `baz1' by the interface `bar3' will be known under the new name `glork1' in the program.
The `only' qualifier means that only the listed identifiers will be imported from the interface. Renaming works together with `only', too.
There must be at most one import part in a program.
The interfaces needn't be exported by Extended Pascal modules but may be UCSD/Borland Pascal units as well.
`import' and modules in general are an ISO-10206 Extended Pascal extension.
GNU Pascal does not yet support `qualified' import.
section 9.163 module, section 9.288 unit, section 9.293 uses.