The import instruction

import name {[,] name}

When an import instruction is carried out, any uninitialized modules named in the instruction are initalized by carrying out the instructions making up those modules.

A module can thus be regarded as a procedure and an import instruction as a procedure call, with the difference that a module is called only the first time it is imported, in order to initialize it.

The names defined in an imported module become incorporated into the name space of the importing module if they were included in an export instruction carried out when the imported module was initialized. Names not exported can still be used, provided that they are qualified with the name of the defining module. See also: Object-Oriented Programming.

In future versions of Slim, it is likely that the programming environment will be used to organize names and to associate functions and procedures with abstract types. Modules, export instructions and import instructions will then be removed from the language.


Herman Venter

This is Slim documentation as snarfed on 27 May 1999 by dB.