The IMPORT statement allows for two kinds of syntaxes:
IMPORT interface [ AS alias ] { "," ... } ";"
or
FROM interface IMPORT item { "," item...} ";"
The IMPORT statement makes visible declarations in an interface, such as procedures and types. IMPORT statements must appear after the MODULE or INTERFACE statement and before any declarations.
When using declarations imported from another module, the non-local declaration name must be qualified with the name of the module it was imported from unless the second form of the IMPORT statement is used.
Here is a simple interface.
INTERFACE Box; CONST Size = 30; END Box;
Here is a client that imports it the usual way.
MODULE Toys; IMPORT Box; VAR boxSize := Box.Size; (* Nonlocal declaration Size qualified by module name Box *) END Toys.
Here is another client that imports only the Size declaration from Box.
MODULE Toys2;
FROM Box IMPORT Size;
VAR boxSize := Size; (* Nonlocal reference Size not qualified *)
END Toys2;