Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Order-of-precedence
Message
De
27/06/2002 09:29:47
 
 
À
27/06/2002 09:17:03
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00672839
Message ID:
00672851
Vues:
8
Hilmar,

I always use them.
- Makes the code easier to read
- Makes me feel more comfortable, I do not trust vfp as I do trust C

! and NOT are unary operators, hence higher precedence
Consider AND : multiplication
Consider OR : addition

you'll never forget
_____________________
>Thanks, that was exactly what I was looking for.
>
>Basically, I wasn't sure whether I could omit the parentheses in an expression of the type:
>
>
>(A and B) or (C and D)
>
>or:
>
>(A or B) and (C or D)
>
>
>I now see that, because of precedence, I can omit parentheses in the first case, but not in the second.
>
>Hilmar.
>
>
>>1) Precedence
>>
>>( )
>>
>>NOT, !
>>
>>AND
>>
>>OR
>>
>>
>>(2) documented in the help under Logical Operators
Gregory
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform