2008-12-27

Delphi 5 "Internal Error: L470"

Some times there are strange bugs in compiler tools. In the past I worked developing in powerbuilder 5.5 for two years and a half, and I discovered that readonly parameters semmed to use a very limited amount of memory, and when exausted new readonly parameters overwrite those in the very beginning of the stack from the calling funtions. Other times it give you a sintax error for a valid code, so you just have to reorganice de code.

Now I've been working in delphi 5 for almost 6 years. This time I have a linker error for Delphi 5. You just build or compile and delphi complains "Internal Error: L470", if you compile again then you get the compiled program, but What is this? the answer my friend could be, but just could be, the following:

"Internal Error: L470" for delphi 5 could mean, that you have declared a funtion or procedure to be overloaded but that is not really overloaded, and you have declared it overload in the implementation not in the interface section, this is the example:


unit MyUnit;

interface

procedure NotAnOverloadedProcedure(a,b,c:integer);

implementation

uses OtherUnit;

procedure NotAnOverloadedProcedure(a,b,c:integer);overload;
begin
AnotherFunction(a*2,b*3,c*4);
end;

end.



The overload keyword is in the wrong section and in the wrong procedure.

So if you get the "Internal Error: L470" find "overload;" for all over your code, write down funtion or procedure names, and check if they are declared to be overload in the implementation section. Notice that this could cause the error, but this condition is maybe not necessary and sometimes not sufficient.

The more I know Delphi, the more I like Java :-)

No hay comentarios: