Re: Private variables question
- From: yannis <none@xxxxxxxxxx>
- Date: Wed, 30 Apr 2008 16:49:15 +0300
Phill Harvey-Smith laid this down on his screen :
Hi,
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.
TYPE TSomeType=class(object)
PRIVATE FLocalVar : INTEGER;
PUBLIC
PROPERTY LocalVar : INTEGER READ FLocalVar;
END;
What I guess i'm asking is why prefix it with 'F' ? I have been tending to use 'Pr' in my own code for Private, I guess the compiler does not care, just wondered why it seemed to be a convention ?
Cheers.
Phill.
As every body said it is F from Field.
Me on the other hand I couldn't care less what the prefix is (finally) 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. So it is easier to type
property Count : integer; CTRL+SHIFT+C
and let the IDE create the private variable for me along with the setter method and let it at that.
Regards
Yannis.
--
If you can't get rid of the skeleton in your closet, you'd best teach it to dance.
- George Bernard Shaw (1856-1950)
.
- Follow-Ups:
- Re: Private variables question
- From: JohnE
- Re: Private variables question
- From: Phill Harvey-Smith
- Re: Private variables question
- From: Jouni Aro
- Re: Private variables question
- References:
- Private variables question
- From: Phill Harvey-Smith
- Private variables question
- Prev by Date: Re: Is Delphi for Win32 still mainstream?
- Next by Date: Re: Private variables question
- Previous by thread: Re: Private variables question
- Next by thread: Re: Private variables question
- Index(es):
Relevant Pages
|