are variable length, and a line can be rewritten to any length between 1 and the line length limit (originally 256, but later changed to 32767) without affecting the surrounding lines. Rewriting a pre-existing line to a length of zero deletes that line without affecting surrounding lines. By default the first line number written to an empty file is 1, and is incremented by 1 with each subsequent write. By default, reading a file starts with the first line number at or above 1 and continues by reading each line in order of increasing line numbers. This means that negative line numbers are 'invisible' parts of a file, which require specific references to read. There are commands (and system subroutines) to renumber lines. A contiguous set of lines can be renumbered to any combination of start and increment as long as lines of the file are not re-ordered. For example, if a file consists of lines 10, 20, 30, 40 and 50, lines 30–40 can be renumbered as 35,36, but not as 135,136, as that would change the sequence of lines. The line index and data are stored on separate disk pages except for the smallest (one page) files, where the line index and data are stored together. The $CREATE command creates line files by default. A side effect of the line-based file system is that programs can read and write individual lines incrementally. If one edits a file (usually a text file) with the MTS file editor ($EDIT), any changes made to lines are written immediately, as are insertions and deletions of specific lines. This makes it quite different from most (byte-oriented) file systems where a file is usually read into and changed in memory, and then saved to disk in bulk. Due to hardware or software problems, line files can become corrupt. The program *VALIDATEFILE checks the structure of line files. Sequential files Sequential files ($CREATE name TYPE=SEQ) are line-oriented files with the first line number being implicitly 1 and incremented by 1 for each line. Once written the length of a line (other than the last line of a file) can not be changed, although any line can be replaced by a line of the same length. Sequential files are generally only readable sequentially from start to end, or written by appending to the end. One can, however, request a reference for the current line of a