Expressions

An expression is a string that defines a formula or criteria, evaluated at runtime. It can be a combination of variables, constants, strings, dates, and operators/functions. For instance "1000 format ``" gets 1,000.00 for US format, while 1.000,00 is displayed for German format.

  

Expressions allow you to dynamically assign or modify the content displayed in a cell based on specific conditions or criteria. They enable you to evaluate the data in a cell and determine the appropriate value or caption to be shown, applying predefined logic or transformations. These expressions are useful for defining new captions, performing calculations, or adjusting content according to different conditions. Exontrol's eXPression component provides a syntax editor that helps you define, view, edit, and evaluate expressions. It allows you to easily check the correctness of your expressions and test their results with different values, making it an ideal tool for configuring applications and ensuring the proper execution of expressions.

Usage examples:

The general-expression supports:

The following is a detailed explanation of all the predefined constants, operators, and functions supported by the general expression.

The constants can be represented as:

The predefined constants are:

The supported binary arithmetic operators are:

The supported unary boolean operators are:

The supported binary boolean operators are:

The supported binary boolean operators, all these with the same priority 0, are :

The supported binary range operators, all these with the same priority 5, are :

The supported binary operators, all these with the same priority 0, are :

The supported conversion operators are:

The bitwise operators for numbers are:

The operators for numbers are:

The operators for strings are:

The operators for dates are:

The supported ternary operators, all these with the same priority 0, are :

The supported n-ary operators are (with priority 5):

The in, switch, and case statements use binary search to look for elements, making them faster than using iif and or expressions. The priority of operations inside the expression is determined by parentheses () and the priority of each operator.