I use a procedure template that has forces me to declare local variables and to assign a default in specific places. I can then use something like +CodeInspector and Code Analyse to spot stupid errors and HelpBuilder to create documentation. Even if it makes the code a bit long at least it is consistent.

i.e.
&& ---
&& --- Check Parameters and Business Objects---
&& ---
If vartype(tcOrgName) = "C"
   this.SetError(1)
EndIf
if vartype(thisform.boOrganisation) = "O"
   this.SetError(2)
EndIf

&& ---
&& --- Declare Local Variables ---
&& ---

Local lcName as String
Local lboOrganisation as boOrganisation
...

&& ---
&& --- Assign Local Variables ---
&& ---
lcName = ""
lboOrganisation = null
...

&& ---
&& --- Code Section ---
&& ---
lboOrganisation = thisform.boOrganisation
....


--
Michael Hawksworth
Visual Fox Solutions

[EMAIL PROTECTED]
www.foxpro.co.uk





_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to