Manual input of arrays
One-dimensional and two-dimensional arrays containing constants can be created manually and immediately displayed on a sheet without any additional operations.
When manually entering array elements, separator characters are used, which depend on the regional settings of the user's operating system:
- In the Russian localization, a backslash with a space (\ ) is used as the separator of elements of one line, a semicolon (;) is used as the separator of lines.
- In the English localization, a comma is used as the separator of elements of one line. (,), a semicolon (;) is used as a separator between the lines.
tip
The examples below use separators applied to Russian localization.
An example of direct input of an array into the cells of a sheet:
MySpreadsheet supports the following element-wise operations when manually entering arrays:
| Operation | Example |
|---|---|
| Adding arrays | {1\ 2\ 3} + {10\ 20\ 30} → {11\ 22\ 33} |
| Subtracting arrays | {10\ 20\ 30} - {1\ 2\ 3} → {9\ 18\ 27} |
| Multiplying arrays | {5\ 10\ 15} * {2\ 3\ 4} → {10\ 30\ 60} |
| Dividing arrays | {10\ 20\ 30} / {1\ 2\ 3} → {10\ 10\ 10} |
| Logical operations | {TRUE\ FALSE\ TRUE} * {TRUE\ TRUE\ FALSE} → {TRUE\ FALSE\ FALSE} {TRUE\ FALSE\ TRUE} + {TRUE\ FALSE\ FALSE} → {TRUE\ FALSE\ TRUE} Multiplication of arrays = logical "AND", sum of arrays = logical "OR". |
| Comparison | {100\ 200\ 300} > {50\ 300\ 100} → {TRUE\ FALSE\ TRUE} |
| Concatenation | {"he"\ "re"\ "wor"} & {"llo"\ "al"\ "ld"} → {"hello"\ "real"\ "world"} |