This shouldnt be..
- Posted by Ralf Nieuwenhuijsen <nieuwen at XS4ALL.NL> Nov 08, 1998
- 511 views
Robert, when I have a file named test.ex containing this: include libA.e include libB.e And libA contains: global constant RIGHT = 1 And libB contains constant RIGHT = 2 Then I run Text.Ex and I get: "Attempt to redefine RIGHT" I should be able to redefine something locally, esspecially when the offending file is *NOT* including the file where the first decleration exist itself. If I swap the files, things *do* work. Now, we're at the name-space problem again, Robert, what would you think of the Modula2 type of approuch. Within an include file, order remains as crucial as it is now. However, if file A includes file B and file B includes file A, then they should both have acces to each other global routines. Even beginnings would consider this to be more logical. Why is the order of include files so crucial ? I understand its not easy to support this, but it is certainly the most logical thing. And when file A does *not* directly include file C it should be accesable at all. I know this would break some code, but as Ive noticed when your shroud a library, only the global routines of that current library are kept global (as you told me), which would break that same code anyway. Ralf