The TaskJuggler User Manual

Project Management beyond Gantt Chart Drawing


<< loadunit << Table Of Contents >> logicalflagexpression >>


Keyword logicalexpression

Purpose

A logical expression is a combination of operands and mathematical operations. The final result of a logical expression is always true or false. Logical expressions are used the reduce the properties in a report to a certain subset or to select alternatives for the cell content of a table. When used with attributes like hidetask or hideresource the logical expression evaluates to true for a certain property, this property is hidden or rolled-up in the report.

Operands can be previously declared flags, built-in functions, property attributes (specified as scenario.attribute) or another logical expression. When you combine logical operations to a more complex expression, the operators are evaluated from left to right. a | b & c is identical to (a | b) & c. It's highly recommended that you always use brackets to control the evaluation sequence. Currently, TaskJuggler does not support the concept of operator precedence or right-left associativity. This may change in the future.

An operand can also be just a number. 0 evaluates to false, all other numbers to true.

Syntax <operand> [(| | & | > | < | = | >= | <= | !=) <operand>...]
Arguments operand

An operand can consist of a date, a text string, a function, a property attribute or a numerical value. It can also be the name of a declared flag. Use the scenario_id.attribute notation to use an attribute of the currently evaluated property. The scenario ID always has to be specified, also for non-scenario specific attributes. This is necessary to distinguish them from flags. See columnid for a list of available attributes. The use of list attributes is not recommended. User defined attributes are available as well.

An operand can be a negated operand by prefixing a ~ charater or it can be another logical expression enclosed in braces.

|
The 'or' operator
&
The 'and' operator
>
The 'greater than' operator
<
The 'smaller than' operator
=
The 'equal' operator
>=
The 'greater-or-equal' operator
<=
The 'smaller-or-equal' operator
!=
The 'not-equal' operator
Context Global scope
See also functions



<< loadunit << Table Of Contents >> logicalflagexpression >>


Copyright (c) 2006, 2007, 2008, 2009, 2010, 2011, 2012 by Chris Schlaeger <chris@linux.com>.TaskJuggler is a trademark of Chris Schlaeger.