This usually happens when a name clash occurs. For example, in the TComponent constructor, imagine if it was written:
constructor TComponent.Create(Owner: TComponent)
The Owner parameter now hides the instance's Owner property. To reference a property, you need to write Self.Owner.
In VCL sources, you will probably find that the prefix A is used when there is such a collision, and is not used when it is not. But there will be inconsistency in the application of this agreement.
I rather hoped that the Embarcadero Pascal style guide would say something about this, but unfortunately it remains silent.
Personally, I never use the A prefix in the code I write. In my experience, hiding is invariably beautiful because what you usually want to call is a parameter, not a member of an instance. If you ever need to refer to an instance member, then Self.Name can be ambiguous.
So, there is no rule, just the agreement is determined by personal preference. Make your choice and stick to it. Consistency is far more important than whether you choose to use such a naming convention.
David heffernan
source share