syntax:types

Any value in EasyMorph can be either number or text or boolean or error. Unlike databases, one column of a table in EasyMorph can hold values of different types, similarly to Excel. Although, keep in mind that most functions expect their arguments to be of certain type.

Numbers are either integer or decimal numbers with fixed decimal point. Floating point numbers are not supported. Effective range is (-7.9 x 10^{28} to 7.9 x 10^{28}) / (10^{0 to 28}) which is 28-29 significant digits with or without decimal point between them.

Examples:

0 -115 100000000.25

Note: In expressions numbers can't be negative (i.e. with single preceding minus). If you need a negative number write it as zero minus something, e.g.

0 - 12.4

instead of

-12.4

To convert text values to numbers see asnumber function.

Text is just a text string.

In expressions wrap text strings in quotes. Single and double quotes are equally acceptable. For example:

'Easy' & "Morph"

Note: Ampersand (&) is the text concatenation operator. To convert values to text see astext function.

Boolean values can have only two values - TRUE and FALSE. Most often they are a result of a comparison or a logical function.

Error is a special value that indicates incorrect calculation. It can only be a result of an expression. You can check if a value is an error using iserror function.

If a table cell has no value - it's so called *empty value*. You can check if a column value is empty using isempty function. The length of an empty value is always zero.

Empty values are somewhat similar to nulls in relational databases but not exactly. For instance an empty value always equals to another empty value and equals to empty string.

All these comparisons are true:

<empty value> = <empty value> <empty value> = ''

Since in EasyMorph a column can contain values of different types, sorting is also applicable to mixed columns. In case of mixed types ascending sort order is as follows:

- Empty cells and errors
- Booleans
- Text
- Numbers

Which means that empty cells and errors are less than anything else, booleans are less than text and numbers, text is less than numbers, numbers are greater than anything else.

syntax/types.txt · Last modified: 2016/11/22 02:35 by dmitry