[ < ] | [ > ] |  | [ << ] | [ Up ] | [ >> ] |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

## 9.293 uses

### Synopsis

In a program:

    program @@fragment foo;

    uses
      bar1,
      bar2 in 'baz.pas',
      bar3;

    [...]

In a unit:

    unit @@fragment Bar3;

    interface

    uses
      bar1,
      bar2 in 'baz.pas';

    [...]

    implementation

    uses
      bar3,
      bar4 in 'qux.pas';

    [...]

### Description

The reserved word ``uses'` in the import part of a program or unit makes the program or unit import an interface.

The keyword ``in'` tells GPC to look for the ``unit'` in the specified file; otherwise the file name is derived from the name of the interface by adding first ``.p'`, then ``.pas'`.

There must be at most one import part in a program.

In a unit, there can be one import part in the interface part and one in the implementation part.

The imported interface needn't be a UCSD/Borland Pascal unit, it may be an interface exported by an Extended Pascal module as well.

### Conforming to

ISO Pascal does not define ``uses'` and units at all. UCSD and Borland Pascal do, but without the ``in'` extension. Delphi supports ``uses'` like described above.

### Example

### See also

section 9.288 unit, section 9.163 module, section 9.113 import.

This document was generated by Frank Heckenbach on May, 10 2002 using texi2html