Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Order-of-precedence
Message
From
27/06/2002 09:29:47
 
 
To
27/06/2002 09:17:03
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00672839
Message ID:
00672851
Views:
7
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
Previous
Reply
Map
View

Click here to load this message in the networking platform