If(condition, ifTrue, ifFalse)
If is included by default in each file as part of the Logic library.
The If() function returns one value if the given condition is true, and another value if the condition is false. It basically works like the If() function in conventional spreadsheets.
The "math display" of an If() function is a logic table.
You can chain If() functions together by putting another If() function in the "false result" input. When this is done, the logic table is extended.
If(A > 100lb, "overload", "OK") = "overload"for A = 120lb
If(B > 20ft, 20ft, B + (20ft - B)/2) = 18ftfor B = 16ft
If(C == "X", 5ft, If(C == "Y", 10ft, "input error")) = 10ftfor C = "Y"