Data Types

In TEAPOT, each value has an associated data type. The following data types exist:

Empty cells behave as if they have 0, 0.0 or “” as value, depending on context. However, the specific unique “empty” value can be tested for explicitly, distinct from any of these, for example with is(loc, empty).
A string is a sequence of characters enclosed by double quotes: This is a string. A double quote can be part of the string, if it is quoted using a backslash: “\””. If you want the backslash to appear in the output instead of quoting the next character, use it to quote itself: “\\”.
Floating Point
Floating point values are inexact, their precision and range depends on the implementation of the C type long double on your system. An example is: 42.0
Integer values are exact, their range depends on the C type long long on your system. An example is: 42
“true” or “false,” used for logical conditions.
Cell labels are of this type, but they generally evaluate to locations (or cause an error if there is no cell with that label), so you don't generally manipulate values of this type.
The names of functions and of special arguments to functions, like the decimal flag to the float() function.
The values of cell labels and the result of the &() function have this type, but there are no location constant literals. However, &(3,2,1), for example, acts very much like a location constant literal.
Syntactical or semantical (type mismatch) errors cause this value, as well as division by 0 and the function error(). An error always has an assigned error message. Functions and operators, when applied to a value of the type error, evaluate to just that value. That way, the first error encountered, possibly deep inside a complicated expression, will be shown.
a TEAPOT formula; some functions (like find()) take an expression as an argument so that it can be evaluated from the point of view of other cells.
the encapsulated visual/display attributes of a cell. Not many operators/functions apply to Style values, but there is one function for each attribute of a Style (that produces Style values with that attribute set), and they may be combined with the + operator. Style expressions are the key to allowing the appearance of a cell to depend on its value.