Waldek Hebisch wrote:
Note that your program consted of a single module (in other words it contained just main program, without EP modules or units).
I started writing in Pascal years before GPC and my programs have survived transition through four different Pascal compilers. When I started the CDC Pascal compiler had an insertion mechanism. I soon realized that this would cause me trouble in giving my programs to others, so I wrote a program in Pascal that does code insertion:
http://www.lecb.ncifcrf.gov/~toms/delila/module.html
Since I pass most of my programs through this one, it had better be reliable, so I wrote a definition before writing the program:
ftp://ftp.ncifcrf.gov/pub/delila/moddef
So modules are nice, but would trap me into a particular compiler. My module program avoids system dependencies. Result: code written 20 years ago still runs.
The compiler internally keeps only one copy of given identifier -- the meaning changes according to the scope, but there is only one place to store the spelling. It is natural to take scope rules into account when warning about capitalization, but that requires extra work.
The compiler already keeps track of scope for each variable. So keeping one copy of an identifier just (apparently) reveals that the GPC code is not efficient. In other words, the warning code could (should!) use the code already used for tracking the scope. (I say this without looking into the code GPC itself, but it seems to be a reasonable inference.)
Yes, it would take more work to do it right. But I suspect that the end result will be very pretty and highly robust.
Tom
Dr. Thomas D. Schneider National Cancer Institute Laboratory of Experimental and Computational Biology Molecular Information Theory Group Frederick, Maryland 21702-1201 toms@ncifcrf.gov permanent email: toms@alum.mit.edu (use only if first address fails) http://www.lecb.ncifcrf.gov/~toms/