Line endings: invisible marks between lines

Concepts explained

A line ending tells a text reader that one line ends and the next begins. Pressing Enter in an editor usually inserts a line ending. It is stored in the file even though you normally do not see a printed symbol.

Three spellings for the same boundary

Name Meaning Stored control characters
LF Line feed One LF
CRLF Carriage return followed by line feed CR, then LF
CR Carriage return One CR

A control character controls text layout or processing instead of drawing an ordinary letter. The names come from older machines that moved a printing carriage and paper.

Pliro accepts all three line endings. CRLF counts as one new line. You usually do not have to change this setting when receiving a friend’s source file.

A line in code or a line in a message?

# language: en
say "One\nTwo"

This instruction occupies one source line. Inside its text, the escape sequence \n makes the output occupy two lines: One, then Two.

Line endings and indentation do different jobs. A line ending moves to the next line; spaces at its start show which block an instruction belongs to. A tab inside a message can be valid even though tabs used for Pliro indentation are rejected.

Try showing three lines with one say instruction. Keep the whole quoted source text on one physical line.

Source encoding rules · Whitespace