Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Progressive llRetVal check and code execution
Message
De
28/11/2005 08:40:55
 
 
À
28/11/2005 08:26:48
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 6 SP5
Divers
Thread ID:
01072377
Message ID:
01072394
Vues:
21
Yes, Viv. That's another possibility I would use that if speed were an issue.

I tend to use the case as it is easier to debug (assert). It tells you exactly where things went wrong. But then, it's personal taste
_________________
>Hi,
>Maybe :
>
>LOCAL llRetVal
>IF DODFAULT() ;
>  .AND. THISFORM.pgf.Page1.txtIno.CheckForBadNextNo() ;
>  .AND. etc...
>  llRetVal = .T.
>ENDIF
>RETURN llRetVal
>
>
>
>
>>>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.
>>
>>Hi,
>>
>>This is what I use most of the times. One entry, one exit. And easier to debug
>>
>>
>>local Success
>>Success = TRUE
>>
>>do case
>>case !m.Success
>>
>>case !DoDefault()
>>    assert FALSE
>>    Success = FALSE
>>
>>case !THISFORM.pgf.Page1.txtIno.CheckForBadNextNo()
>>     assert FALSE
>>    Success = FALSE
>>
>>.....
>>
>>endcase
>>
>>return m.Success
>>
Gregory
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform