Marco van de Voort wrote:
I'm not sure why you do it like this -- perhaps it's just a relic from ancient times when GPC didn't know about importing interfaces. In this case, I'd suggest to get rid of it. Otherwise, any ideas for fixing this are welcome.
The only other solution I can think of:
- such modules shouldn't be allow to initialise, and have stuff that must be
initialised global in the implementation part. (the part that is separately compiled)
How? When the module is compiled, the compiler doesn't know how it will be used?
- All initialisation for the variabeles in the INTERFACE, are done by the
mainprogram.
Again how? All the compiler sees (in Ian's example) are `external' declarations, and initializing all external variables would in general be wrong.
Frank