The order in which an expression is processed. Mathematical precedence is normally:

In order to properly compute the formula that converts Fahrenheit to Celsius, which is **fahrenheit-32*5/9**, the expression

must be used with parentheses separating the fahrenheit-32 from the multiplication. Since multiplication is evaluated before subtraction, 32 would be multiplied by 5 first, which is not what is wanted.

Logical precedence is normally:

In the dBASE query:

all gray ties and anything red will be selected, since ANDs are evaluated before ORs. Grouping the colors in parentheses as in the example below yields only gray and red ties.

1. unary + and - signs2. exponentiation3. multiplication and division4. addition and subtraction

(fahrenheit-32)*5/9

1. NOT2. AND3. OR

list for item = "TIE" .and.color = "GRAY" .or. color = "RED"

all gray ties and anything red will be selected, since ANDs are evaluated before ORs. Grouping the colors in parentheses as in the example below yields only gray and red ties.

(color="GRAY" .or. color="RED")

All other reproduction requires permission

Copyright 1981-2024

The Computer Language Company Inc.

All rights reserved