Go to the first, previous, next, last section, table of contents.

Interface

The interface is the public portion of a module. All declarations in the interface are visible to clients of the module.

Interface files have the name of the module with an .i3 extension, and have the following format:

INTERFACE <interface-name>;

{Imports}      (* See section Imports *)

{Declarations} (* See section Declarations *)

END <interface-name>.

Generally, <interface-name> is the same as the name of the corresponding module.

Here is an example of an interface for a module MyModule which is in a file called MyModule.i3:

INTERFACE MyModule;

CONST MaxEntries = 53;
TYPE Thing = RECORD name: TEXT; size: INTEGER END;

PROCEDURE PrintThing(READONLY r: Thing);
PROCEDURE MakeThing(n: TEXT; s: INTEGER): Thing;

END MyModule.


Go to the first, previous, next, last section, table of contents.