An import specifies a program that is to be imported and run together with another program.
A program is identified with three pieces of information:
The prefix is a string that is added to all functions and data structures of the imported program.
For example, if the prefix is gl
then the imported functions, Open
and Close
are renamed glOpen
and glClose
.
The reason the prefix is needed is that functions and data structures of two programs might be named the same thing. For example, two data structures might be called Part
, or two functions might be called Open
.
Programs have namespaces, but the name spaces are not used in the program text to differentiate functions or data structures.
An import has a list of functions are used in the importing program. This list is generated automatically from the importing program text.
It is the functions of the imported programs that are available. The imports of the imports will also be imported, but in order for their functions to be avaialble, they must be imported directly, and not only indirectly.
We would be more than happy to help you. Our opening hours are 9–15 (CET).
📞 (+47) 93 68 22 77
Nils Bays vei 50, 0876 Oslo, Norway