DelphiFeeds.com

  • Dashboard
  • Popular Stories
  • Trending Stories
  • Feeds
  • Login
Trending now

The IFDEF Problem!

Quickly Build Natural Language Processing Capable GUI Apps With Delphi And Python NLTK

Freebie Friday: capture controls or forms

Easily Learn How To Use Python List Comprehensions In A Delphi Windows GUI App

Powerful Native Open Source Hard Disk, Folder and Storage Analyzer Built In Delphi

Incredible Database Development And Visualization Tool Is Built In Delphi

User Defined Functions with InterBase

Learn How To Use C++ Extending Sizeof For Windows Development

Learn How Easy It Is To Apply Updates With TFDQuery.OnUpdateRecord In Delphi

4 Ways to Generate Quick Test Ideas

Measure Heart Rate Using Delphi And C++ Builder With The Power Of ThingConnect IoT Device ...

Learn How To Use Python Dictionaries In A Delphi Windows GUI App

Create Enterprise-Grade WebSockets Based Apps With Powerful Components For Delphi

If you use an implementation of TNonRefCountInterfacedObject, then document in the descendants how lifetime management ...

High DPI Support, Improved TIFF and New Performance Demo in ImageEn Imaging Library v9.3.0

Delphi Tip of the Day – What is the "A" prefix I see used on parameters?

1
Michael Riley Michael Riley 2 years ago in tip-of-the-day 0
Today's Delphi Tip of the Day is all about consistent naming conventions. Consistency in the Delphi and Object Pascal language makes it easier to read and comprehend the code.

I have often wondered why the "A" prefix is used on Delphi parameters. Instead of just accepting it as some esoteric thing as I have done for the past twenty years, I googled around and found an answer. Have a look at the following code snippet:
constructor TPerson.Create(AFirstName, ALastName: string);
begin
FirstName := AFirstName;
LastName := ALastName;
end;
The "A" in "AFirstName" and "ALastName" denotes an Argument as in the above constructor code example.

Typical naming conventions that are used are:
A := Argument
F := Field
T := Type
E := Exception
I := Interface
L := Local Variable
G := Global Variable
The key is to be consistent in all your code. If we as a Delphi community are consistent then it makes it much easier to communicate with each other.

See also:
Object Pascal Style Guide By: Charles Calvert
[Archive]

#delphi #tipoftheday #capecodgunny

Enjoy,
Gunny Mike
https://zilchworks.com

Trending Stories

  • The IFDEF Problem!

  • Quickly Build Natural Language Processing Capable GUI Apps With Delphi...

  • Freebie Friday: capture controls or forms

  • Easily Learn How To Use Python List Comprehensions In A...

  • Powerful Native Open Source Hard Disk, Folder and Storage Analyzer...

Embarcadero GetIt

  • Brook Framework

    Microframework which helps to develop web Pascal applications.

  • Trial - TMS Scripter

    Add the ultimate flexibility and power into your apps with native Pascal or Basic scripting and […]

  • Trial - TMS VCL Chart

    DB-aware and non DB-aware feature-rich charting components for business, statistical, financial […]

  • Trial - TMS VCL Cloud Pack

    TMS VCL Cloud Pack is a Delphi and C++Builder component library to seamlessly use all major cloud […]

  • Trial - TMS VCL UI Pack

    Create modern-looking & feature-rich Windows applications faster with well over 600 components […]

  • Learn Delphi Programming
  • Learn C++
  • Embarcadero Blogs
  • BeginEnd.net
  • Python GUI
  • Firebird News
  • Torry’s Delphi Pages
Copyright DelphiFeeds.com 2021. All Rights Reserved
Embarcadero
Login Register

Login

Lost Password

Register

Lost Password