[NEXT] [PREV]    HANDBOOK / GENTLE PRIMER / Organizing Larger Projects /

The Export Clause

Gentle
Applications
Concepts
Examples
Handbook
Support
Download

The export clause follows the use clause. It may be empty or of the form


   'export' I1 , ... , In
where I1 , ... , In is a list of identifiers (optionally) separated by commas. The identifiers name items that are declared inside the module. These items are provided for other modules. They can be used there if the module containing the export clause appears in the use clauses of the other modules.

E.g. if a module CodeGen contains an export clause


   'export'
      Encode
then it must declare an item (say a predicate) Encode. This item can be used in the module Compiler if Compiler lists CodeGen in its use clause.

Items declared in a module but not listed in the export clause are not available to other modules. (A module does not constitute a separate name space; hence the name of such an item cannot be reused in other modules.)





[NEXT] [PREV]