An interface reveals portions of a module to the outside world so that clients can access functionality of modules. All declarations in an interface are visible to clients of a module.
Each interface usually takes the form of a file with a ".i3" extension, and have the following format:
INTERFACE interface-name; IMPORT imported-interfaces; Declarations; ... Declarations; END interface-name.
Generally, interface-name is the same as the name of the module that exports this interface. For example, a CDROM module exports a CDROM interface.
Here is an example of an interface for a module Thing contained in a file called Thing.i3:
INTERFACE Thing; (* Thing does not need to import any other interfaces, hence no IMPORT clause. *)
CONST MaxEntries = 53; TYPE T = RECORD name: TEXT; size: INTEGER END; PROCEDURE Print(r: T); PROCEDURE Make(n: TEXT; s: INTEGER): T; END Thing.