Export Instruction

export name {[,] name}

The names appearing in an export instruction are incorporated into the name space of every module directly importing the module containing the export instruction.

Names not exported are not hidden or private to their defining modules, but can be used everywhere the defining module is imported, provided that they are qualified with the names of their defining modules.

Only globally defined names can be exported. That is, a name defined locally in a procedure or function, cannot be exported. Exporting a name which is not globally defined elsewhere in the module, serves to define it as a variable with type Entity and value Undefined.

When defining an abstract type, it is usual to export only the name of the type and the name of its constructor function. The names of the other functions and procedures associated with the type are carried with any values belonging to the type. (See 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.