Martin Liddle wrote:
cbfalconer@yahoo.com writes
Martin Liddle wrote:
I am experimenting with gpc 20021128 built with gcc 3.2.1. However I have a compilation problem. The following code fails to compile with the error message:
Maybe I am thick, but I fail to see any reason for this sort of source file structure. Surely the purpose of units (or modules) is to separate the source into relatively independant units. Something with the above structure should be written as a single simple source file, as Wirth intended, while separate things should be in separate source files. IMNSHO :-)
This wasn't intended to be an example of good programming practice or of our particular application. It is a simple example hacked out of our 300,000 lines of code to demonstrate in the simplest possible way the problem I am experiencing in trying to compile the full application. If I combine everything into a single source file then the problem doesn't exist which doesn't make it a useful example for the developers. Given that I have noted this in one of the comments that you have chosen to snip then I do think you are being thick.
I was not intending my comment to be a criticism of your practice, but of the fact that such a multiple module per source file operation is even allowed. Of course I recognize that yours was a cut-down demonstration of a 'fault'. Once we are dealing with units we are outside the realm of standards anyway, and I don't know if the same sort of combination is allowed with the ISO10206 methods.
I am arguing that I see no point to the practice, and that stopping all consideration of the source file after the final '.' is desirable. I may well have missed some reason for allowing such practices. Maybe Borland did allow such; if so I never used it and never missed it. My article was intended to be a request for elucidation of possible reasons for allowing the practice, if such exist.