[fpc-pascal] parameter names local, global, glocal

Jonas Maebe jonas.maebe at elis.ugent.be
Wed Jan 18 21:30:03 CET 2006


On 18 Jan 2006, at 21:21, Wolfram Kl├Ąger wrote:

> Conclusion: never call any parameter of any procedure or function  
> exactly like any property of any class and its ancestors. So far I  
> thought, parameter names of functions and procedures are always  
> local, i.e. valid for this function or procedure block only. Is  
> this a bug or feature of FPC vs. Delphi?

It's a feature. The reason is that otherwise the property is masked  
by the parameter inside the method body, which may cause unintended  
effects. This error should not be reported if you switch to Delphi mode.


Jonas


More information about the fpc-pascal mailing list