Skip to content

Latest commit

 

History

History
105 lines (79 loc) · 1.41 KB

Control characters.md

File metadata and controls

105 lines (79 loc) · 1.41 KB

Escape sequences:

Escape sequences are characters that can be used for different purposes in output operations. Such sequencees can be used in any String, but are only displayed when these Strings are displayed in the terminal.

Escape sequences always begin with a \.




List of available escape sequences:

\n:

This character creates a line break in the console.

Example:

(defun main () (
    (princ "Hello\nWorld")
))

Output:

Hello
World

\t:

This character creates a tabulator in the terminal.

Example:

(defun main () (
    (princ "Hello\t World")
))

Output

Hello    World

\"

This character creates a quotation mark inside a String.

Example:

(defun main () (
    (princ "Hello \"World\"")
))

Output:

Hello "World"

\':

This character creates a single quotation mark inside a String.

Example:

(defun main () (
    (princ "Hello \'World\'")
))

Output:

Hello 'World'

\b:

This character creates a backspace.

Example:

(defun main () (
    (princ "Hello Wo\brld")
))

Output:

Hello Wrld

\f:

This character represents a form feed.


\r:

This character represents a carriage return.