On 17 Apr 2004 at 23:33, Waldek Hebisch wrote:
[...]
There was a long discussion around November 2002:
Ah, yes! I remember now. I don't think we want to open that can of worms again - except that it seems that the issue has bothered me enough (when doing some porting) for me to raise it twice.
To compile your program one has to add a single line to gpc. However, then also the following "works":
program adelph2; var bar : integer; procedure foo; begin Writeln (bar ()); end; begin bar := 1; foo (); bar() := 2; foo (); end.
I hope that Delphi does not allow my program.
It does not. This is the output: e:\temp>dcc7 adelph2.pas Borland Delphi Version 15.0 Copyright (c) 1983,2002 Borland Software Corporation E:\temp\adelph2.pas(5) Error: Missing operator or semicolon E:\temp\adelph2.pas(10) Error: Missing operator or semicolon E:\temp\adelph2.pas(14)
Also with my patch Writeln (); is still rejected (builtin functions/procedures are handled differently then user defined ones).
Delphi rejects "Writeln ()" as well. AFAICS, the empty brackets are only allowed for parameter-less routines. Since Writeln can take parameters, that code should be rejected.
So I would estimate that proper support will take 30-150 lines of code.
Even with what I have just noted above? If yes, then even though it might seem like too much work, it is probably less work than having to deal with this problem all the time when porting Delphi code (and actually, the code I was porting today was FreePascal code).
If you are not interested in doing the proper support, can you please just send me the single line patch? For me that is a far lesser evil than what I have had to do today. Thanks.
Best regards, The Chief -------- Prof. Abimbola A. Olowofoyeku (The African Chief) web: http://www.bigfoot.com/~african_chief/