Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
True or False
Message
From
16/01/2007 10:05:38
 
 
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Environment versions
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01185857
Message ID:
01185883
Views:
17
>>>So, what are your predictions?
>>>
>>>
? .f. or .t. or .f. and .f. or .f.
>>>? .f. or .f. or .t. and .f. or .f.
>>
>>True and False
>
>We reasoned from left to right.
>
>Our initial reasoning for the 1st one was:
>step 1) false or true = true
>step 2) true or false = true
>step 3) true and false = false
>step 4) false or false = FALSE
>
>Our initial reasoning for the 2nd one was:
>step 1) false or false = false
>step 2) false or true = true
>step 3) true and false = false
>step 4) false or false = FALSE
>
>We now know we were wrong and why. But does anybody here (except Sergey, who obviously appears to know why) know why?

Help ?
Logical Operators


Logical operators work with all data types and return a Logical value.
The following table lists the logical operators in order of precedence.

Logical Operators

Operator Action Code 
( )     Expression groups 
NOT, !  Logical negative

AND     Logical AND 
OR      Logical inclusive OR
        #define _FALSE_	0
	#define _TRUE_	1
	#define or		+
	#define and		*
	
	
	? _FALSE_ or _TRUE_ or _FALSE_ and _FALSE_ or _FALSE_
	? _FALSE_ or _FALSE_ or _TRUE_ and _FALSE_ or _FALSE_

	
	#undefine _FALSE_
	#undefine _TRUE_	
	#undefine or
	#undefine and
Gregory
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform