Uses in implementation part of an unit
Wed, 22 Oct 1997 14:00:20 +0100 (MET)
GPC does NOT allow "uses" in the implementation section of a unit. That is,
the following piece of code cannot compile.
unit a;
interface
implementation
uses
b;
begin
end.
In most (Borland-style) programs, moving "uses b" to the interface part (an
obvious workaround; or *solution* if the current GPC behavior is a feature
and not a bug) should not make a difference, but I imagine that there could
be a few exceptions.
The Turbo Pascal 7.0 manual says about this:
"A uses clause in the implementation section allows you to further hide the
inner details of a unit, because units used in the implementation section
aren't visible to users of the unit. It also enables you to construct
mutually dependent units."
Jesper Lund
Jesper Lund (jel@hha.dk)
HTML conversion by Lluís de Yzaguirre i Maura
Institut de Lingüística Aplicada -
Universitat "Pompeu Fabra"
e-mail: de_yza@upf.es