On 6 Mar 2005 at 8:20, Frank Heckenbach wrote:
[...]
I suggested `--enable-result', but as it may confuse someone not familiar with this problem, perhaps rather `--enable-implicit-result' (to be more explicit ;-).
That is fine. If it were my decision however, I would simply generate a warning whenever a global variable "Result" is defined. That should warn whoever is porting legacy code about potential problems, and once he/she has ensured that there are no problems, then he/she can disable the warnings.
Perhaps if everybody wanted to port their code to the Delphi dialect. But default warnings would also appear for people who have no intention doing so (including myself ;-), and who wouldn't agree to calling their code "legacy", BTW.
But AFAICS, the people who are porting legacy code to GPC are the ones we are worried about (because the original writers of the code did not know anything about "Result").
In any case, "--enable-implicit-result" would do just fine (especially if it can be turned on in a source file).
IMHO it would be better to convice Borland to add explicit result variables (probably very easy to do for them) and add a warning for all that legacy code that uses implicit `Result', so one can change it, and they can finally disable it sometime. :-)
I just saw a pig flying past my window ... ;)
Best regards, The Chief -------- Prof. Abimbola A. Olowofoyeku (The African Chief) web: http://www.greatchief.plus.com/