Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6963729
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T15:49:55+00:00 2026-05-27T15:49:55+00:00

In Delphi coding standard, what is the rule to add an A prefix before

  • 0

In Delphi coding standard, what is the rule to add an A prefix before parameter name in functions/procedures?

For example:

constructor Create(AOwner: TComponent); override;
constructor CreateNew(AOwner: TComponent; Dummy: Integer = 0); virtual;
procedure AddAncestor(Component: TComponent); //No A prefix, why?

function FindClass(const ClassName: string): TPersistentClass; //No A prefix, why?
function GetClass(const AClassName: string): TPersistentClass;
procedure StartClassGroup(AClass: TPersistentClass);
procedure GroupDescendentsWith(AClass, AClassGroup: TPersistentClass);

Ton more examples are in Delphi common classes (see Classes, Forms, etc.). Hence my question – what is the rule when to add and when not?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T15:49:55+00:00Added an answer on May 27, 2026 at 3:49 pm

    It’s typically done when there would be a clash of names. For example in the TComponent constructor imagine if it was written:

    constructor TComponent.Create(Owner: TComponent)
    

    Now the Owner parameter hides the Owner property of the instance. To refer to the property you would have to write Self.Owner.

    You will probably find, in the VCL sources, that the A prefix is used when there is such a clash, and not used when there is not. But there will be inconsistency in the application of this convention.

    I rather hoped that the Embarcadero Pascal style guide would say something on the matter, but sadly it remains silent.

    Personally I never use an A prefix in code that I write. In my experience hiding is invariably fine because what you typically want to refer to is the parameter rather than the instance member. If you ever need to refer to the instance member then Self.Name can disambiguate.

    So, there’s no rule, just convention determined by personal preference. Make your own choice and stick to it. Consistency is far more important than whether or not you opt to use such a naming convention.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

What Delphi coding standards document(s) do you follow? Our company is looking at putting
Coding in Delphi, attaching an OnKeyPress event handler to a TStringGrid: The OnKeyPress event
Delphi strings use single quotes, for example ' a valid string '. How does
The code formatter in Delphi 2010 is a useful tool for developing coding standards,
i am coding opera recovery tool in my delphi i am using c++ which
Sometimes, when coding in RAD Studio 2009 (Delphi), suddently the behaviour of the code
After years of coding Delphi programs as untestable code in forms and datamodules, including
I am coding in Delphi Prism and I need to pause a loop with
I'm coding an application on both C and Delphi, I've XTEA Encryption in both,
I'm coding a small Video Previewing tool in Delphi 2010, but I want to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.