Data Types

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

Empty
Empty cells have 0, 0.0 or ``'' as value, depending on context.
String
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 double on your system. An example is: 42.0
Integer
Integer values are exact, their range depends on the C type long on your system. An example is: 42
Location
Cell labels and the &() function have this type, but there are no location constant literals.
Error
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 which was found deep inside a complicated expression will be shown.