>Hi
>
>I have this code snippet, lots in fact, where the code goes something like this:
>
LOCAL llRetVal
>
>llRetVal = DODEFAULT()
>
>IF llRetVal
> llRetVal = THISFORM.pgf.Page1.txtIno.CheckForBadNextNo()
>
> IF llRetVal
>...
> ENDIF
>ENDIF
>
>RETURN llRetVal
>
>Any suggestion where the code can be more linear.
>
>Or do I RETURN as soon as I get a false value?
>Or do I IF Condition()?
>
>Please advise.
It dependes of what you want. If you want to exit immidiately after you get .f. for returning value then issue RETURN .f. what the condition is not satisfied. If you want to perform full test and then return .f. you can do:
That way you perform ALL tests no metter what is not satisfied
llRetVal = DODEFAULT()
llRetVal = llRetVal AND THISFORM.pgf.Page1.txtIno.CheckForBadNextNo()
llRetVal = llRetVal AND SecondCondition()
RETURN llRetVal
That way check stop after first .f. condition from left to right.
llRetVal = DODEFAULT() AND;
THISFORM.pgf.Page1.txtIno.CheckForBadNextNo() AND;
THISFORM.SecondCondition()
RETURN llRetVal
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.