Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
NOT vs ELSE
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Divers
Thread ID:
00157136
Message ID:
00157174
Vues:
18
>It does bring to mind the following, but I'm not totally sure that it would still apply. This is from something I read sometime ago. In constructing an IF < lexpr1> OR < lexpr2 >, it's a good idea to place the condition that evaluates to .T. (if known) the greater amount of times first. This is because, the second condition only is evaluated when the first is .F. Placing the lesser condition first will require a greater number of comparisons of both expressions.
>
>Like I said, this was sometime ago, so I don't know (and haven't tested) if it still applies. I believe, however, that it probably does.

Yes... it still works that way... also, with AND expressions, once a .f. is hit, it stops evaluating the expression... this is why you can do...

if vartype(oObject) = "O" and oObject.Property = whatever

If the first half is .f., and it DID try to eval the next expression, you would get an Object Not found.

BOb
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform