Ian Thurlbeck wrote:
The reason I use this odd style is because the program involved is part of a suite of numerical programs which were originally written using Suns Pascal compiler. It was then ported to Decs Pascal, then finally to gpc. The original code used this style of modules and global variables (actually there are only 2 if I remember correctly) and both Sun and Dec pascal support this style. gpc almost does :) or did. I can't change the program code because lots of user models have been written against this and they would stop compiling if I changed something like this.
The question remains -- how does the compiler know the module name. The only way I can think of right now is to explicitly give it on the command line (something like `--init-modules=foo,bar'). I think this would be fairly easy to implement in the compiler (though it's probably just a kludge). Would this help you?
Frank