Keywords: teapot

Subsections

- Copy/Move
- Fill
- Clear
- Insert
- Delete
- Sort
- Mirror

## Block Functions

### Copy/Move

To copy a block of cells, mark it, then move the cell cursor to where the upper left corner of the copy should be and issue the copy command. Moving works similar, just use the move command. Of course you can mark three-dimensional blocks and copy them anywhere in the three-dimensional sheet, but doing so requires a good three-dimensional imagination to get what you want.

### Fill

To fill a block of cells, first mark a the block it should be filled with. This may be just one cell! Then move the cell cursor to where the upper left corner of the block to be filled should be and issue the fill command. You will be prompted for how often the marked block should be repeated in each dimension. For example, you may to repeat a cell 9 times below. Mark it, then move down one row. Issue the fill command and answer 1 to the number of column repetitions, 9 to rows and 1 to layers.

### Clear

Clearing means to delete the cell contents and set all attributes to the default value. If you want to preserve the attributes, just edit the contents of a cell and delete them.

### Insert

Since work sheets can be three-dimensional, you can insert cells in all three dimensions, too. The inserted cells will be empty and their attributes have the default values. Cells will always be moved away from the front upper left corner to make room for the inserted cells. If no block is marked, you will be asked if you really only want to insert a cell of if you want to insert a whole row, line or sheet.

### Delete

Deleting works contrary to inserting. The deleted cells will be filled by moving neighbour cells to their positions. You will be prompted for the direction from where those cells will be taken. Deleting an entire column column-wise is done by marking the column, use the delete command and chose X direction.

###
Sort

Marked blocks of cells can be sorted after one or multiple keys, either column-wise, row-wise or depth-wise. Sorting a two dimensional block row-wise will sort lines, but if a three dimensional block is sorted row-wise, then horizontal layers will be sorted. The sort key is specified as vector which is orthogonal to the sorted elements, either in ascending or descending order. The following example illustrates the sort function. The upper left part of the screen should look like this:

0 | 0 | 1
0 | 1 | one
1 | 2 | two
2 | 3 | three
3 | 4 | four

The box shows you which block to mark. Now this block should be sorted row-wise, with the sort key being the numbers in descending order, i.e. we want the lines being numbered 4,3,2,1. Go to the block menu, then select sort. Use `R)ow`, because that is how we want to sort this block. The X position of the sort key vector is 0, because the column 0 contains the numbers. The Z position is 0, too, because those numbers are on sheet 0. Now chose `D)escending` as direction. At this point, you could add a secondary key or decide to sort the block by the keys entered so far. Use `S)ort region` to sort it. That's it, the screen should look like this now:

0 | 0 | 1
0 | 4 | four
1 | 3 | three
2 | 2 | two
3 | 1 | one

### Mirror

Mirroring a marked block of cells can be done in three directions: Left/right, upside/down and front/back.