613-518-1166 info@zimdatabases.com

Developing ZIM Applications

How To Use Logic Expressions

< All Topics

A logic expression is an expression that, when evaluated, yields either a $True or a $False result.

Logic expressions are subdivided into conditional expressions and Boolean expressions.

How To Construct Conditional Expressions

A conditional expression is a complex logic expression that consists of two value expressions and an associated conditional operator. The conditional operator performs a designated comparison of the value expressions and returns the result $True or $False. Conditional expressions can be combined into Boolean expressions.

The conditional operators are

= (equals)

<> (not equals)

< (less than)

> (greater than)

<= (less than or equals)

>= (greater than or equals)




Examples of Conditional Expressions

EmpNum < 1254

DeptNum >= EmpNum

First Name = “Smith”

DeptDesc <> “Sports”

EmpNum between 1000 and 2000

LastName like “%ith%”

Event.EventName in (“F1”, “F2”, “Escape”)

ProdCode not between 542 and 863

LastName not in (“Smith”, “Jones”)

FirstName not like “Sm%”

How To Use Boolean Expressions

A Boolean expression is a complex logic expression that consists of one or more conditional expressions and an associated Boolean operator. The Boolean operator performs a Boolean operation on the $True or $False values returned by the conditional expression(s) and returns the result $True or $False.

The Boolean operators are





Examples of Boolean Expressions

LastName = “Allan” or FirstName = “Allan”

DeptNum = “Sports” and Salary > 45000 and LastName = “Smith”

not Salary > 45000


See Also




Truth Tables

Was this article helpful?
0 out Of 5 Stars
5 Stars 0%
4 Stars 0%
3 Stars 0%
2 Stars 0%
1 Stars 0%
How can we improve this article?
Table of Contents