[fpc-devel] Circular references and forward declarations
Martin Sucha
anty.sk at gmail.com
Tue Jan 5 21:15:56 CET 2010
Hello,
On Tuesday 05 January 2010 20:44:06 JoshyFun wrote:
> In the past I had some autogenerated pascal programs, but to include
> them in another unit I must manually split the files in interface and
> implementation. Would be possible to do something like:
>
> interface
> [...]
> {$I InterfaceOnly C:\xxxx.pas}
> [...]
> Implementation
> {$I ImplementationOnly C:\xxxx.pas}
> [...]
>
You should be able to achieve that by putting some ifdefs around interface and
implementation (and other) parts of your autogenerated programs and then for
example
interface
{$define InterfaceOnly}
{$I file.pas}
{$undefine InterfaceOnly}
implementation
{$define ImplementationOnly}
{$I file.pas}
{$undefine ImplementationOnly}
Regards,
Martin Sucha
More information about the fpc-devel
mailing list