Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Anyone know for sure?
Message
De
27/07/2001 01:35:21
 
 
À
27/07/2001 01:28:43
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00536211
Message ID:
00536216
Vues:
9
>>...if VFP is guaranteed to execute clauses left-to-right so constructs like
if requery('MyView')=1 AND reccount('MyView')>0
>>...
>>endif
will work "as expected"?
>
>Yep. This is called short-circuiting, and it's a feature that you can count on. (You can't in VB and many other languages).

Yeah, I know, that's why I asked for VFP. Can you point to some MS documentation that explicitly states this?

...not trying to cast aspersions, I believe you and IME I've never seen it work any other way.

As a general rule I always use an alternate construct like
IF REQUERY("MyView") = 1
  IF RECCOUNT("MyView") > 0
    ...

  ENDIF

ENDIF
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform