# (princ \[expression \[file-descriptor\]\]) [GstarCAD 2011](../../../Index.md) → [Developer Reference](../../%28Developer%20Reference%29.md) → [AutoLISP Reference](../%28AutoLISP%20Reference%29.md) → [LISP Functions](%28LISP%20Functions%29.md) <a id="243"></a> ## (princ \[expression \[file-descriptor\]\]) --- Print, taking into account control characters. --- This function prints to a file or to the screen. When a *file-descriptor* is provided, LISP prints to a file; when the *file-descriptor* is missing, LISP prints to the **Prompt History** window. - When you are printing to a file, the file must previously have been opened with the [open](%28open%20filename%20mode%29.md) function in write "w" or append "a" mode. The argument *expression* represents the expression to be printed. It can be any expression, not just a string. The *expression* is printed, as well as a new line. Unlike [print](%28print%20-expression%20-file-descriptor-%29.md) and [prin1](%28prin1%20-expression%20-file-descriptor-%29.md), the **princ** function activates any control characters present within the *expression.* You can use the following control characters within the *expression*: | Control Character | Meaning | | --- | --- | | \\\\ | \\ backslash character | | \\" | " quote character | | \\e | Escape | | \\n | Newline | | \\r | Return | | \\t | Tab | | \\nnn | Octal code nnn | ### Examples | Code | Prints | Returns | | --- | --- | --- | | (**princ** "\\nName:") | (new line) Name: | "\\n Name:" | | | | | | (setq a "Address: ") | | | | (**princ** a) | Address: | "Address: " | | (**princ** 'a) | A | A | | (**princ** "Telephone: " f) | Telephone: (to file f) | "Telephone: " | **NOTE**  The difference between the **princ** function and LISP's other print-related functions (for example, [print](%28print%20-expression%20-file-descriptor-%29.md) and [prin1](%28prin1%20-expression%20-file-descriptor-%29.md)) is that **princ** acts upon control characters. **Tell me about...** [(prompt string)](%28prompt%20string%29.md) [(setq symbol1 statement1 \[symbol2 statement2\] ...)](%28setq%20symbol1%20statement1%20-symbol2%20statement2-%20...%29.md) [(terpri)](%28terpri%29.md) [(write-line string \[file-descriptor\])](%28write-line%20string%20-file-descriptor-%29.md) [LISP Compatibility](../LISP%20Compatibility.md) [Programming Overview of LISP (LISt Processing) Language](../Programming%20Overview%20of%20LISP%20%28LISt%20Processing%29%20Language.md) <a id="holding"></a> ## Other versions with matching text [GstarCAD 2012](../../../../2012/Developer%20Reference/AutoLISP%20Reference/LISP%20Functions/%28princ%20-expression%20-file-descriptor-%29.md)