Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
True or False
Message
 
 
À
16/01/2007 10:05:38
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Versions des environnements
Database:
Visual FoxPro
Divers
Thread ID:
01185857
Message ID:
01185891
Vues:
15
>>>>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
>
That is very explanatory.
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform