Grant Jacobs wrote:
At 9:00 AM -0800 4/3/03, Russell Whitaker wrote:
On Tue, 4 Mar 2003, Frank D. Engel, Jr. wrote:
Even worse, with circular unit references (which I don't like, but we have to support them), things get even trickier. I could construct some example if you really care ...
Why do we have to support them? I thought units were already non-standard, and I'm not aware of any compiler that DOES support circular units; is there one? FreePascal does not, and Turbo Pascal does not.
User's Guide, Borland Pascal With Objects, version 7.0, page 131:
"Because units in Borland Pascal don't need to be strictly hierachi- cal, you can make circular unit references. ...see chapter 10 in the Language Guide."
Somewhat ironically for someone who has been talking about hierarchial unit models, I've run into this circular reference thing a few times in the code I'm porting. I ended up creating separate sub-units to resolve the issue.
Sorry to be annoying again, but it was you who talked about hierarchical unit models:
: I eventually resolved this by directly 'using' modules, rather than : rely on the hierarchy
[the hierarchy which unit inheritance provides]
: Since these uses statements were within the interface section, I : presumed the definitions would propagate upwards so that they form a : hierarchy.
: {=>} points out the offending line of source. If this is truly the : problem, then I presume there is no way of building a hierarchy of : units in GPC at present?
So it doesn't appear ironic at all -- with unit inheritance you get a strict hierarchy indeed. With the BP model, not necessarily.
Frank