Uses in implementation part of an unit_(re)
Wed, 22 Oct 1997 17:42:22 +0200 (MEST)
According to Jesper Lund:
> GPC does NOT allow "uses" in the implementation section of a unit. [...]
Fixed:
8< ---- diff for parse.y ----------------------------------------------------
@@ -6123,6 +6136,7 @@
;
unit_implementation:
+ import_part /* This may be empty */
any_declaration_part
optional_init_and_final_part
;
8< --------------------------------------------------------------------------
... but the Automake mechanism does not handle this correctly. To work
around, compile one of the units manually before automaking the program.
I will try to fix this for the next beta.
> 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.
Yes - not only a few ones. You cite it:
> The Turbo Pascal 7.0 manual says about this:
> "[...] It also enables you to construct
> mutually dependent units."
Greetings,
Peter
Dipl.-Phys. Peter Gerwinski, Essen, Germany, free physicist and programmer
peter.gerwinski@uni-essen.de - http://home.pages.de/~peter.gerwinski/ [971005]
maintainer GNU Pascal [971001] - http://home.pages.de/~gnu-pascal/ [971005]
Peter Gerwinski (peter@agnes.dida.physik.uni-essen.de)
HTML conversion by Lluís de Yzaguirre i Maura
Institut de Lingüística Aplicada -
Universitat "Pompeu Fabra"
e-mail: de_yza@upf.es