[fpc-devel] Local variable names and colision with attributes/properties names

Graeme Geldenhuys graeme at geldenhuys.co.uk
Thu Sep 27 17:34:36 CEST 2012

On 2012-09-27 16:08, michael.vancanneyt at wisa.be wrote:
> The compiler helps you by forcing you to use a prefix in objfpc mode in
> case you forgot.

The change in FPC mode objfpc was definitely a good thing. I had code
where a class had an Index property, and other methods of that class had
an Index parameter name. Even though it was my own code, I had to triple
check the method's implementation to find the real meaning when I used
the Index identifier somewhere in that method.

Now with the new language rule, I don't have such issues any more. Index
will be the property name, AIndex will be the parameter, lIndex will be
a local variable. Much simpler for my brain to process. :)


More information about the fpc-devel mailing list