Re: Private variables question



Bob Swart <Bob@xxxxxxxxxx> wrote in news:481874BA.8070404@xxxxxxxxxx:

Hi Phill,

This is more from a mater of interest than any technical reason, but
there seems to be a lot of code around where the private variables are
called FSomething e.g.

F for "Field" I reckon.

That could indeed be it :) Knew there had to be a simple explanation :)

just wondered why it seemed to be a convention ?

A bit like the I prefix which stands for "Interface" or the T prefix
which stands for "Type" (where old versions of Visual C++ used the "C"
prefix for "Class").

Yeah I do thend to use TWhatever, someone else mentioned using AWhatever for
argument, bout the only place I have seen this (that I can remember) is
Indy.

Cheers.

Phill.

.



Relevant Pages

  • Re: Private variables question
    ... there seems to be a lot of code around where the private variables ... What I guess i'm asking is why prefix it with 'F'? ... I've also gotten into the habit of prefixing local variables with L. ... This isn't so much to make them easier to spot, ...
    (borland.public.delphi.non-technical)
  • Re: underscore prefix
    ... This is olb naming convention for private variables. ... convention you should use m_ as prefix for private members ... > explanation for the reason for this. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Private variables question
    ... This is more from a mater of interest than any technical reason, but there seems to be a lot of code around where the private variables are called FSomething e.g. ... Me on the other hand I couldn't care less what the prefix is I just use the auto complete feature of the IDE which auto prefix the private members with F and it doesn't give me an option which I can change it. ...
    (borland.public.delphi.non-technical)
  • Re: underscore prefix
    ... > I think the guidlines actually discourage use of m_ when it says "Do ... >>This is olb naming convention for private variables. ... >>convention you should use m_ as prefix for private members ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: underscore prefix
    ... not apply a prefix to field names or static field names." ... >This is olb naming convention for private variables. ... >convention you should use m_ as prefix for private members ...
    (microsoft.public.dotnet.languages.csharp)