Logical expressions

<< Click to Display Table of Contents >>

Navigation:  User guide > Logic >

Logical expressions

A logical expression is either true or false.

A logical expression consists of one or more tests which may be combined with the operators "or", "and", "differs from", and "equivalent to".

Parentheses may be used to control the order of processing.

A test in CL is an expression which is evaluated as true or false. There are two kinds of test in CL, simple tests and relational tests.

Where the same variable is referenced in two or more subsequent tests, the variable name and the following / (forward slash) can be omitted. This is not affected by parentheses so that in the following logical expression:

$127/1+($128/4.7)+9,

the last item is $128/9.

For further information on logical expressions please see the appropriate section below:

Simple tests

Negative simple tests

CT function

Relational tests

Logical operator

Examples of logical expressions:

$104/v,

$123/'K'.$124/b,

$101-105/1..20+($class/>2.$ma/2..9),

$wsum/1.0..5.0*$xbrand/ns,

ct($123,$124)/1+$123-125.ge.20,