# What are Boolean Expressions?

In addition to numeric expressions, you may use logical operators to create Boolean expressions that compare two numeric expressions yielding a result of True or False. These expression may be used in IF…THEN statements and condition fields to make specific decisions in the model based on the values of two numeric expressions.

#### Boolean Operators

The following table lists and illustrates the use of Boolean operators to create Boolean expressions.

#### Examples of Boolean Expressions

You may use simple or compound numeric expressions on either side of the Boolean operator.

IF v_Total_Pieces > 5 * a_Pkg_Qty THEN…

IF (a_Weight + 5) <= (a_Pkg_Qty / 2) THEN…

IF N(25, 4.8) + a_Weight = v_Total_Pieces – 10 THEN…

IF a_Weight >= v_Total_Pieces AND a_Pkg_Qty > 20 THEN…

IF v_Total_Pieces = a_Pkg_Qty OR a_Pkg_Qty > 35 THEN…

### Operator Precedence

As in conventional mathematics, ProcessModel evaluates expressions with more than one operator according to certain rules of precedence. Expressions with more than one operator are evaluated from left to right in the following order:

1. Terms inside parenthesis: ( )
2. Multiplication: *; and Division: /