[fpc-pascal] Variable visibility problem

Michael Van Canneyt michael at freepascal.org
Wed Jul 12 16:49:53 CEST 2006

On Wed, 12 Jul 2006, Alexandre Leclerc wrote:

> 2006/7/12, Michael Van Canneyt <michael at freepascal.org>:
>> This is not a bug.
>> Your code will compile in DELPHI mode, but not in FPC mode.
> Ok, I do not want Delphi mode (I try never using this mode: I code in
> FPC isn't it?). But as a side question, is there a reason we can't do
> that in FPC? I should restate: What is the design reason for this
> decision/behaviour? Is it the way 'pascal object' is supposed to
> behave?

It's not good practice to have local variables with the same name as a
public method/property. How will you tell which one is used ?
(obviously you can find out, but at first glance it will not be clear)


More information about the fpc-pascal mailing list