Constants

Technical Articles > Using Formulas in Table Cells

A constant is a non-varying value that can be part of a formula. TX Text Control supports five different types of constants: Numerical, logical, string, error and array constants.

Numerical constant:

A numerical constant can be an integer (e.g. 4), a decimal number (e.g. 3.937) or a number in engineering notation (e.g. 5e4). Furthermore, a numerical constant can be combined with a prefixed minus (e.g. -7.6) sign.

Formula Result
9+7 16
4*5.5 22
4*3e5 1200000
-9+7 -2

Logical constant:

Two logical constants are provided: TRUE and FALSE.

Formula Result
15>7=TRUE TRUE
15>7=FALSE FALSE

String constant:

A string constant is a concatenation of characters surrounded by double quotes.

Formula Result
"TX"&"Text"&"Control" TXTextControl
"Two"="One" FALSE
"FALSE"="FALSE" TRUE

Array constant:

An array constant represent a matrix of numerical, logical or/and string constants. The constants of each row in this array are separated by commas. Rows by semicolons. The array constant itself is surrounded by braces.

Formula Result
SUM(10,{1,2,3;4,5}) 25