Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
EVL and NVL
Message
From
20/05/2004 06:19:46
 
 
To
19/05/2004 19:01:14
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00905138
Message ID:
00905540
Views:
13

I am testing on Visual FoxPro 6, no service pack:

? NULL and .T. ==> NULL
? NULL and .F. ==> .F.

Do you get different results in another version?


Sorry, A my error.

Docs Behavior of Null Values in Logical Expressions explain this, and this is correct.

Because AND and OR have symmetrical proprerty, => XRY = YRX,
the cut of VFP logic evaluation can return not correct values
if the first operand is NULL;
then a NULL value it cannot cut the logic
? .F.    AND m.X <=== return .F. for every X, and X is not evaluated
? .NULL. AND m.X <=== must return .F. if m.X, then m.X must to be evaluated
? .T.    OR  m.X  <=== return .T. for every X, and X is not evaluated
? .NULL. OR  m.X <=== must return .T. if m.X, then m.X must to be evaluated
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform