ANSI Escape Code - Sequence Elements

Sequence Elements

Escape sequences start with the character ESC (ASCII decimal 27/hex 0x1B/octal 033). For two character sequences, the second character is in the range ASCII 64 to 95 (@ to _). However, most of the sequences are more than two characters, and start with the characters ESC and [ (left bracket). This sequence is called CSI for Control Sequence Introducer (or Control Sequence Initiator). The final character of these sequences is in the range ASCII 64 to 126 (@ to ~).

There is a single-character CSI (155/0x9B/0233) as well. The ESC+ but the ESC+[ sequence is clearer.

Though some encodings use multiple bytes per character, the following discussion is restricted to ASCII characters, and so assumes each character is directly represented by a single byte.

Read more about this topic:  ANSI Escape Code

Famous quotes containing the words sequence and/or elements:

    It isn’t that you subordinate your ideas to the force of the facts in autobiography but that you construct a sequence of stories to bind up the facts with a persuasive hypothesis that unravels your history’s meaning.
    Philip Roth (b. 1933)

    Nature confounds her summer distinctions at this season. The heavens seem to be nearer the earth. The elements are less reserved and distinct. Water turns to ice, rain to snow. The day is but a Scandinavian night. The winter is an arctic summer.
    Henry David Thoreau (1817–1862)