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

Jonas Maebe jonas.maebe at elis.ugent.be
Thu Jan 19 10:02:43 CET 2006


On 19 jan 2006, at 00:18, Wolfram Kläger wrote:

>> ... This error should not be reported if you switch to Delphi mode.
>
> Unfortunately no. This kind of errors ís reported by FPC, no matter  
> which mode, while Delphi does not.
>
> I understand your explanation, but don´t really understand that an  
> anyproc.anyparam.name can eventually mask an  
> anyclass.anyproperty.name.

 From your example I understood you were talking about  
childclass.method.param.name masking parentcalls.property.name. That  
is perfectly possible.

> Even more, since several procedure or function declarations within  
> a class or unit can share the same parameter names. In Delphi and  
> FP as well.

The reason this is not a problem, is that you cannot access the  
parameters of one procedure in another anyway. But you can access a  
property of a parent class in the method of a child class.


Jonas


More information about the fpc-pascal mailing list