CIB format technical documentation (EN)

CIB format/output as "document formatter"

Calculation Functions

CIB format/output also offers possibilities for calculating certain mathematical functions.


Option name

Option Value

Type

ABS()

(since CIB format Version 7.5.2)

Calculates the absolute value within the brackets.

Examples:

ABS (5)  = 5

ABS (-5) = 5

int

AND() or &&

(since CIB format Version 7.5.2)

Determines whether all arguments within the brackets are true.

Possible values:

„0“       At least one of the arguments is not true.

„1“       All conditions of the argument are true.

Examples:

AND (1;0) = 0              (1&&0) = 0

AND (1;1) = 1              (1&&1) = 1

boolean

AVERAGE()

(since CIB format Version 7.2.1)

Determines the mean value of two or more numbers.

Example:

AVERAGE (3;5;7) = 5

int

COMPARE() or <>

(since CIB format Version 7.5.2)

Compares two or more values.

Possible values:

„0“       Not all values of the function are equal.

„1“       All values of the function are equal.

Examples:

COMPARE (2;3) = 0       (2<>3) = 0      

COMPARE (2;2) = 1       (2<>2) = 1

boolean

COUNT()

(since CIB format Version 7.5.2)

All values of the function are the same.

Example:

COUNT (2;3;4) = 3

COUNT (2) =1

int

DEFINED()

(since CIB format Version 7.5.2)

Checks if the argument is defined within the brackets.

Possible values:

„0“       argument is not defined or results in an             error message.

„1“       argument is defined and does not produce                an error message.

boolean

FALSE()

(since CIB format Version 7.5.2)

Does not take arguments. It always generates the value "0".

Example:

FALSE() = 0

boolean

IF()

(since CIB format Version 7.5.2)

Examines the first argument. If the argument is true, the function returns the second argument. If the argument is false, the function returns the third argument.

Example:

IF(10>=9;15;20) = 10

IF(8>=9;15;20) = 20

int

INT()

(since CIB format Version 7.5.2)

Rounds the value within the brackets down to a round number.

Example:

INT(4,98) = 4

int

MAX()

(since CIB format Version 7.2.1)

Compares two or more numbers and determines the highest value.

Example:

MAX (1;3;9) = 9

int

MIN()

(since CIB format Version 7.2.1)

Compares two or more numbers and determines the lowest value.

Example:

MIN (1;3;9) = 1

int

MOD()

(since CIB format Version 7.5.2)

This function takes two arguments and returns the rest after the second argument is divided by the first. If the remainder is "0", the function returns "0.0.

Examples:

MOD (12;5) = 2

MOD (15;5) = 0

int

NOT() or !

(since CIB format Version 7.5.2)

This function checks if an argument is true and reverses its value.

Possible values:

„0“       The argument is true.

„1“       The argument is false.

Examples:

NOT(1=1) = 0             !(1=1) = 0

NOT(1=2) = 1              !(1=2) = 1

int

OR () or ||

(since CIB format Version 7.5.2)

Determines whether one of several conditions is met.

Possible values:

„0“       No conditions are fulfilled.

„1“       At least one condition is met.

Examples:

OR (0;0) = 0                             (0 || 0) = 0

OR (1;0) = 1                             (0 || 1) = 1      

boolean

PRODUCT()

(since CIB format Version 7.2.1)

Multiplies the transferred numerical values.

Example:

PRODUCT (2;3)=6

int

ROUND()

(since CIB format Version 7.5.2)

 

This function takes two arguments. It rounds the first number up or down to the next integer. The decimal places are specified with the second argument.

Examples:

ROUND (3,456;2) = 3,46

ROUND (3,456;0) = 3

int

SIGN()

(since CIB format Version 7.5.2)

 

This function checks if the value inside the brackets is greater, equal or less than zero.

Possible values:

„-1“      The value is less than zero.

 „0“      The value is zero.

 „1“      The value is greater than zero.

Example:

SIGN (-2) = -1

SIGN (0) = 0

SIGN ( 5) = 1

 

SUM()

(since CIB format Version 7.2.1)

Adds the values of two or more data fields.

Example:

SUM (2;3) = 5

int

TRUE()

(since CIB format Version 7.5.2)

This function takes an argument and determines if it is true. If it has no argument, it always returns the value "1".

Possible values:

„0“            Argument is not true.

„1“       Argument is true.

Example:

TRUE() = 1

TRUE(1=1) = 1

TRUE(1=2) = 0

int

%

(since CIB format Version 7.5.2)

Determines the percentage from a number.

Examples:

5% = 0,05

75%= 0,75

float

^

(since CIB format Version 7.5.2)

Exposure. Operation that raises one amount to the potency of another.

Example:

(3^3)=9

Int

HtmlSuppressEvalError

(since CIB format Version 7.7.2)

This property ensures that the result of the evaluation is not output in case of errors and thus no output of errors for calculation functions are performed. There will be a empty string output.

int

 

These field commands are also provided in the calculation functions: 

LEFT | RIGHT | ABOVE | BELOW

 

Notes:

  • When using the field commands LEFT, RIGHT, ABOVE, BELOW within a table, you must ensure that the table has a clean structure with regard to rows and columns. You should avoid using linked table cells (horizontally or vertically), since the user cannot clearly identify which row or column it belongs to.
  • When using the field commands LEFT, RIGHT, ABOVE, BELOW, recursions should be avoided (e.g. LEFT is based on a cell with RIGHT on the left).
  • Direct reference to another table cell using a letter/number combination (e.g. C4) is not supported. Tables in a word processing program do not have a fixed structure (as in a spreadsheet), nor are the names for row/column specified.
    The user could find a cell (e.g. H14) only by manual counting. It is better to use field variables and field functions to make the formatting directly recognizable.
  • All previously mentioned calculation functions can be nested.

 

Currently these functions are only supported in the German speaking locale.

If another language is used (for example, English), a syntax error message.