Prof A Olowofoyeku (The African Chief) wrote:
I believe so - these snippets are from the Delphi 7 help file:
"Libraries can be built from multiple units. In this case, the library source file is frequently reduced to a uses clause, an exports clause, and the initialization code."
"You can put exports clauses in the interface or implementation section of a unit. Any library that includes such a unit in its uses clause automatically exports the routines listed the unit's exports clauses-- without the need for an exports clause of its own."
It gets even wierder ... :-(
BTW: the Delphi 7 help file also discourages the use of "index". This is a new one (at least, to me): "Use of index specifiers, which are supported for backward compatibility only, is discouraged and may cause problems for other development tools."
At least. :-)
Well, it can - sort of - if you have exports clauses in the units themselves. I also came across something:
"Type Switch Syntax {$ObjExportAll On} or {$ObjExportAll Off} Default {$ObjExportAll Off} Scope Global The {$ObjExportAll On} directive exports all symbols in the unit file in which it occurs. This allows the C++ compiler to create packages containing Delphi-generated object files."
Seems also very strange. At least in BP it's quite clear that interface declarations are exported and implementation declarations are not. I don't see any reason for deviating from this. If you want to export something, just write it in the interface.
Well, either I'm overlooking quite a few things, or they just like to make things unnecessarily complicated for no good reason.
I think, unless someone brings up new arguments to convince me otherwise, I'll forget about this and will implement none of it.
The most I could imagine doing would be an explicit re-export of (selected) imported interfaces (though we'd still have to find a syntax for it), or a "library" that automatically re-exports all its interface imports (leaving aside the linking issues for now).
Frank