## Logical functions

Logical functions allow to differentiate from one case to the other. There are three fundamental elements:

• if / then / else,
• comparisons,
• logical references.

Case Differentiation

The construct ( if a then b else c ) checks first, if condition a is correct. If it is, it will calculate b, else c.

As a condition you need an expression which returns Yes / No. That can be:

• a Yes / No field,
• a comparison,
• a logical reference.

Example:

• (if Yes then 1 else 2) always will return 1
• (if No then 1 else 2) always will return 2
• (if Age >= 18 then “of full age” else”minor”)

Comparisons

Comparisons always return a Yes / No value.

(a = b) a equal b

(a ≠ b) a unequal b

(a < b) a less than b

(a ≤ b) a lass than or equal b

(a ≥ b) a greater than or equal b

(a > b) a greater than b

(a like b) textual comparison between a and b where capital letters and several special charactersare ignored.

Logical Combination

Using logical combination you can construct more complex conditions. They need a Yes / No value as an argument and return a Yes / No value as well.

Yes the constant value Yes

No the constant value No

(a and b) results in Yes, if a as well as b are Yes – else No.

(a oder b) results in Yes, if a or b or both are Yes – else No.

(not a) results in Yes, if b is No – else No.