Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
AND OR Logic
Message
From
17/12/2008 21:51:51
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
17/12/2008 21:21:20
Jay Johengen
Altamahaw-Ossipee, North Carolina, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
01368370
Message ID:
01368376
Views:
7
>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)
  • Previous
    Reply
    Map
    View

    Click here to load this message in the networking platform