I like explicit definition of memvars myself. So I would probably put
llOK=.F. in the same place you set the value for lnID even though the
LOCAL both delcares and defines it. And I might add a comment inline
that says it will only be set .T. when everything is OK.
MB Software Solutions wrote:
The line below in the ELSE block specifically sets the llOK variable
to .F. However, that variable is .F. by default. Would you include
that line anyway? I know, it's trivial, but I was just curious about
what assumptions other developers make. (Personally, I try to make no
assumptions but in this case, it shouldn't matter at all.)
LPARAMETERS tcSomeValue
LOCAL llOK as Logical, lnID as Integer
lnID = this.oBiz.GetKey(tcSomeValue)
IF lnID > 0 THEN
llOK = .T.
ELSE
WITH this.oBiz
MESSAGEBOX(.cErrMsg,.nErrBtns,.cErrTitle) && echo problems
encountered by BizObj
llOK = .F. && <--- this line isn't necessary since by default llOK
is .F., but would you include it for good style?
ENDWITH && this.oBiz
ENDIF && this.oBiz.GetKey(tcSomeValue) > 0
--
Richard Kaye
Artfact/RFC Systems
Voice: 617.219.1038
For the fastest response time, please send your support
queries to:
Technical Support - [EMAIL PROTECTED]
Australian Support - [EMAIL PROTECTED]
Internet Support - [EMAIL PROTECTED]
All Other Requests - [EMAIL PROTECTED]
---------------------------------------------------------
This message has been checked for viruses before sending.
---------------------------------------------------------
_______________________________________________
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.