Recent

Author Topic: Classes - Inheritance - how to add an additional parameter to the constructor?  (Read 2739 times)

lucamar

  • Hero Member
  • *****
  • Posts: 4219
The 'A' or 'a' prefix stands for 'argument' (aka 'parameter' due to 'P' already being used for pointers).
I always imagined that the A just was that: a, as in AString meaning "a string", which more or less equals "some string"..

Yeah, I though so too (more so when you find code that instead uses "the", as in "TheString") but after the Dragon's answer I am starting to think that it really means (or meant) nothing and that any interpretation is purely subjective ;)
Turbo Pascal 3 CP/M - Amstrad PCW 8256 (512 KB !!!) :P
Lazarus/FPC 2.0.8/3.0.4 & 2.0.12/3.2.0 - 32/64 bits on:
(K|L|X)Ubuntu 12..18, Windows XP, 7, 10 and various DOSes.

Gustavo 'Gus' Carreno

  • Hero Member
  • *****
  • Posts: 757
  • Professional amateur ;-P
Hey All,

The 'A' or 'a' prefix stands for 'argument' (aka 'parameter' due to 'P' already being used for pointers).

I actually assumed it in this way, maybe because of the way all the other prefixes have been selected:
  • T is for Type
  • F is for Field
  • P is for Pointer

So for me it made sense that A would be for Argument.
I did, nonetheless, miss the fact that P, for Parameter was already used :)

Cheers,
Gus

PS: And if I'm not mistaken, with this post I've earned my chops as Hero Member, YAY, LOL!!!
Lazarus 2.3.0(trunk) FPC 3.3.1(trunk) Ubuntu 21.04 64b Dark Theme
Lazarus 2.0.12(stable) FPC 3.2.2(stable) Ubuntu 21.04 64b Dark Theme
http://github.com/gcarreno

VTwin

  • Hero Member
  • *****
  • Posts: 1059
  • Former Turbo Pascal 3 user
The 'A' or 'a' prefix stands for 'argument' (aka 'parameter' due to 'P' already being used for pointers).

Interesting, I assumed as lucamar and Bart did.

This makes me appreciate the convention much more.
“Talk is cheap. Show me the code.” -Linus Torvalds

Free Pascal Compiler 3.2.0
macOS 10.13.6: Lazarus 2.0.12 (64 bit Cocoa)
Ubuntu 18.04.3: Lazarus 2.0.12 (64 bit on VBox)
Windows 7 Pro SP1: Lazarus 2.0.12 (64 bit on VBox)

 

TinyPortal © 2005-2018