Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
AND and OR evaluations in conditional statements
Message
De
13/04/1999 10:51:40
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00206066
Message ID:
00207820
Vues:
14
>Jim,
>
>> This "proves" that the so-called VFP 'optimization' is a figment of the imagination
>
>This is a completely false statement. If you use function calls in place of memvars in the logical expression, you will in fact be able to trace the execution and see that VFP will do it's own optimization. I'd point you back at the code I posted earlier in the thread as a starting point. The expression in that code was purposely constructed to be non-optimizeable to show that VFP correctly understood the operatir precedence. If you run ? t1() or t2() and trace it the t2() function WILL NOT BE CALLED, the optimizer knows that calling it can not change the end result, so it doesn't call it.

David,

Agreed with your statement. However what Jim said about VFP having to evaluate the operator type ( i.e. AND, OR, etc. ) is required to determine whether the expression result must be evaluated, correct?

Bill
William A. Caton III
Software Engineer
MAXIMUS
Atlanta, Ga.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform