Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

A basic coding syntax question. 5

Status
Not open for further replies.

mikejcurtis

IS-IT--Management
Mar 24, 2004
17
US
This is kind of a funny thing to ask after the number of projects I've completed but, I'm self taught in Visual Foxpro. I'd like to be less ignorant and write code that conforms with what is common VFP format. Is there an online reference that discribes accepted naming conventions with code? I see things like m.oContainer and m.nCtrlCount and since I don't know what the rubrik is. Is it that any memory variable that references an Object has an o before the descriptor and anything that is a counter or number has an n before the descriptor? What are the others?
 
Like 'they' say - whoever 'they' is, The good thing about standards is there are so many to choose from.

Some like to use the Hungarian notation, but what you have is a fairly common syntax for Fox: prefacing the variable name with they variable type. It's what I like to use too.
o for object, n for numeric, d for date, t for datetime and so on.
Another addition that some people use is "l" (el) in front of a variable to define the scope. Such as lnVariable for local numeric, and lpVariable for local parameter.

To answer your question though, I have seen a reference to a VFP code standard, but I can't recall where. I would have to do search too.


-Dave Summers-
[cheers]
Even more Fox stuff at:
 
Mike,

Send me a email at DWGREWE HOTMAIL COM and I'll be glad to forward you a word document of the written standards we have for our company. Warning, it is over 30 pages long and addresses everything from Naming standards to white spaces to defining memvar and procedure names to sectioning code blocks.

Like it was pointed out about, there are many standards, It is just a matter of finding one ( or a mixture of standards ) you like and enforcing it.



David W. Grewe Dave
 
hello how to save a listbox in the tables or database and see in the datagrid???? cerdan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top