Previous: Formatted Input/Output, Up: Input/Output [Contents][Index]
Some byte values do not have an associated printable character; for
example, the "newline" and "return" characters. Program code cannot
contain non-printable characters. To allow such characters to yet be
included in programs, C-style escape codes can be used. An
escape code is introduced by a backslash \
. The following escape
codes are recognized by LUX:
\a
stands for the "audible bell" character, which when printed may produce an audible signal, such as a beep.
\b
stands for the "backspace" character, which when printed makes the cursor go one position to the left.
\f
stands for the "formfeed" character, which when printed makes the cursor go down to the next page.
\n
stands for the "newline" character, which when printed makes the cursor go to the beginning of the next line.
\r
stands for the "carriage return" character, which when printed makes the cursor go to the beginning of the current line.
\t
stands for the "horizontal tab" character, which when printed makes the cursor go to the next horizontal tab stop position.
\v
stands for the "vertical tab" character, which when printed makes the cursor go to the next vertical tab stop position.
\\
stands for a single backslash \
character.
\?
stands for a question mark ?
character.
\'
stands for a single quote '
character.
\"
stands for a double quote "
character.
\ooo
with "ooo" equal to one, two, or three octal digits: stands for a character whose value is equal to the indicated octal number.
\xhh
with "hh" equal to an arbitrary number of hexadecimal digits: stands for the character whose value is equal to the indicated hexadecimal number.
Previous: Formatted Input/Output, Up: Input/Output [Contents][Index]