# DASYLab IF...THEN statement

**Question:** How do I construct an IF - THEN like the one below using DASYLab?

IF Input > 20 then

Output = 24

ELSE

Output = Input

ENDIF

**Answer:**

The solution is to use the formula module with the following equation:

( ( In(0) > 20 ) * 24 ) + ( ( In(0) <= 20 ) * In(0) ), where In(0) in input 0.