Module

A module is a sequence of instructions that introduce definitions into the program and perform initializations. Modules are typically used to define routine libraries, abstract data types and class definitions.

Every module is associated with its own name space: By default, the names defined in a module are only known within the module. However, if a name is exported from a module, the name is entered into the name space of every other module which imports this module. See also: qualified names.

When a module is used to define an abstract type, the name space of the module is associated with every value of this type. It is therefore not advisable to use a single module to define more than one abstract type (see Data Modelling).

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.