613-518-1166 info@zimdatabases.com

Developing ZIM Applications

Expressions and the $Null Property

< All Topics

An object that has not been assigned a value, or whose value is unknown, is considered to be $Null. For example, at the start of an application session, global variables do not have an assigned value, so each is considered $Null. If the name of an object with an unassigned or unknown value is used as an atomic expression, the expression is considered to be $Null.

The $Null property is special in two ways:

  1. Any arithmetic or functional expression that contains a $Null value expression evaluates to $Null.
  2. Any logic expression that contains a $Null value expression is considered logically false.

For example, if the variable Salary is $Null, then

Salary * 1.1 evaluates to $null, and Salary = 20000 is logically false.

However, you can successfully check if an expression is $Null. If Salary is $Null, then

Salary is $Null is logically true and Salary is not $Null is logically false.

Notice that conditional expressions involving the system variable $Null cannot use an = (equals) or <> (not equals) operator; instead, you must use the operator IS [NOT]. The use of IS and IS NOT emphasizes that $Null is a property and not a value.

Note: $Null can also be written Null.

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