[DUG] Component names
Stacey Verner
stacey at cjntech.co.nz
Thu Aug 25 15:15:05 NZST 2005
I don't see "P" around too often but I do see "A" all the time.
We have used "P" since before I started so we stick with it, but we
could have easily been using "A" instead. It definitely helps.
Its actually pretty incosistent in borlands code. Looking in DBTables we
have:
constructor Create(AOwner: TObject; Handle: hDBICur; CBType: CBType;
CBBuf: Pointer; CBBufSize: Integer; CallbackEvent:
TBDECallbackEvent;
Chain: Boolean);
procedure AddSession(ASession: TSession);
function GetSession(Index: Integer): TSession;
Many ouf out Third party components, such as Developer Express and
Toolbar2000 use "A".
Stacey
> -----Original Message-----
> From: delphi-bounces at ns3.123.co.nz
> [mailto:delphi-bounces at ns3.123.co.nz] On Behalf Of Conor Boyd
> Sent: Thursday, 25 August 2005 14:43
> To: 'NZ Borland Developers Group - Delphi List'
> Subject: RE: [DUG] Component names
>
> Is it?
>
> Not wanting to start a standards argument, but for example
> AFAIK the Borland standard for attributes of a class is F for
> field, e.g. FMyAttribute:
> String. I've never seen P for parameter used widely at all...
>
> Cheers,
>
> C.
>
> -----Original Message-----
> From: delphi-bounces at ns3.123.co.nz
> [mailto:delphi-bounces at ns3.123.co.nz] On Behalf Of Stacey Verner
>
> Note: It is standard to prefix parameters with "P" (stands for
> parameter) or "A" (stands for argument) so you should have
> PMyTable or PTable.
> Similarly Local variables are usually prefixed with "L". In
> the end it makes it easy for figure out whene a variable
> comes from. "P" is a parameter. "L"
> is a local variable and anything else is a property of your class.
>
> _______________________________________________
> Delphi mailing list
> Delphi at ns3.123.co.nz
> http://ns3.123.co.nz/mailman/listinfo/delphi
>
More information about the Delphi
mailing list