Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
AND OR Logic
Message
De
17/12/2008 21:51:51
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
17/12/2008 21:21:20
Jay Johengen
Altamahaw-Ossipee, Caroline du Nord, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
01368370
Message ID:
01368376
Vues:
8
>Are the results of these different?
>
>!EOF() OR !BOF()
>!EOF() AND !BOF()
>
Yes, of course. Just look at the truth table for the AND and for the OR operators.

Assume that the conditions are preceded by an IF. Statements following the IF will be executed:
  • In the first case, if any of the two conditions are fulfilled. Not necessarily both.
  • In the second case, if both conditions are fulfilled simultaneously.

    For a "normal" table, having at least one record, the first condition will always be true.

    However, if you are at EOF() or at BOF(), the second condition will NOT evaluate to true.
    Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
  • Précédent
    Répondre
    Fil
    Voir

    Click here to load this message in the networking platform