[fpc-devel]Some idea of joint units

Olle Raab automagi at algonet.se
Wed Nov 26 03:31:17 CET 2003


03-11-13 13.01, skrev Yakov Sudeikin följande:

> Guten morgen,
> 
> The same idea that I sent to borland bug/feature website years ago and want
> to share with greatly respected FPC community.
> Let's call it "reuse unit", wich can save a lot of time and space for
> developers and is really easy to understand. For instance you create a unit:
> 
> - 8< - - - - - - - - - - begin unit - - - - - - -
> Unit VCL;
> Reuse Classes, Forms, Controls, Dialogs;
> - 8< - - - - - - - - - - end unit - - - - - - -
> 
> Then in your app you only type
> 
> use VCL;
> 
> And that's it. This will be just the same as using all of the units, this is
> kinda cool, ain't it? Especially with the smartlinking. In C++ you can get
> the same results with the preprocessor, but preprocessors suck you know.
> 

In the "Mac World", this "uses propagation" has existed a long time. It
means that all units in the uses-clause (in the interface part) of a unit is
exported. You can turn on/off this feature on a project basis, if you want
to stay compatible with old code. In fact this feature is often used instead
of $include.


Olle





More information about the fpc-devel mailing list