Always get runtime error of "Mismatch parameter calling xxx.p". I guess it is caused by "late binding" feature of progress so that the compiler cannot find this kind of issues at compile time.
Is there any tool or compile options to check this kind of error? If no, is there any clue how to write one?
Use OO! :)
But we have to maintain millions of lines of legacy code. It is currently impossible to convert them to OO
Hence the smiley, but the point is that this is an advantage of OO that does not exist without it. By the same token, you presumably know that most of your existing code works so you really only need to deal with new code. So, consider introducing OO for your new code. This might mean some refactoring, but if you are changing signatures anyway, then you have to do some refactoring anyway.
It is imaginable that one could add a signature checker to the tool I will be discussing at PUG Challenge Americas in June. It won't be in the first release, but it seems possible.
That's a good solution, but I think the OP is after a way of tracking it at compile time, not at run time.
Brian is correct. The ABL Compiler can not provide this functionality, since the RUN statement is very dynamic in nature. For example, the name of the procedure invoked is evaluated at runtime. Additionally, if the invoked procedure is contained in another persistent procedure, that information is not evaluated till runtime. Given these limitations, the compiler cannot provide the level of validation you are looking for. As Thomas noted, this is one of the advantages of Object Oriented programming.