>>o Command and Functions are always in CAPS.
>
>Basically, the previous rule is the only one that I don't like.
>
>I would add:
>- Always use () for methods, func/procs and events.
>- Always use [] for arrays.
>- Declare all locally used variables as local/private at the begining of each func/proc/method. Don't declare variables in other places inside funcs/procs/methods (ie: inside loops, ifs, etc.)
>- Use FOR ... ENDFOR not FOR ... NEXT ... (this is really a matter of taste, but ENDFOR is more in the FoxPro style)
>- Don't use "&&" comments.
>- Don't write code lines longer than 50-60 chars.
>- Parenthesize each condition in composed logical expressions.
>- Don't use square brackets for character strings unless you need it.
>
>And for index names: if the index expression is a single field, than the name of the index is the same as the name of the field.
>
>Vlad
In addition:
When continuing on the next line, put the operator on the next line. For example use:
lcVar = "This is a string that can " ;
+ "get really long"
IF (a = b) ;
AND (b = c)
rather than
lcVar = "This is a string that can " + ;
"get really long"
IF (a = b) AND ;
(b = c)
I've found this method to greatly increase readability.
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer