Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
EVL and NVL
Message
From
19/05/2004 09:58:04
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
19/05/2004 09:40:35
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00905138
Message ID:
00905265
Views:
22
>Example:
>
>* this is simple and clear
>IF doOperation1()
>  IF  doOperation2() && executed for doOperation1() = .T.
>      doOperation3() && executed for doOperation1() AND doOperation2() = .T.
>  ENDIF
>ENDIF
>* a developer can use this, but this is not equal to the previous code
>= doOperation1() ;
> .AND. doOperation2() ; && executed for doOperation1() = .T. or .NULL.
>    .AND. doOperation3() && executed for (doOperation1() = .T. or .NULL.) AND (doOperation2() = .T. or .NULL.)
>
>
>Fabio

Interesting; I thought the two versions would work the same; but I had not thought about NULL.

I hadn't experimented, and didn't know that NULL AND .F. = .F. I would have expected NULL, but I think that .F. actually makes more sense.
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
Next
Reply
Map
View

Click here to load this message in the networking platform