# (prin1 \[expression \[file-descriptor\]\]) [GstarCAD 2012](../../../Index.md) → [Developer Reference](../../%28Developer%20Reference%29.md) → [AutoLISP Reference](../%28AutoLISP%20Reference%29.md) → [LISP Functions](%28LISP%20Functions%29.md) <a id="242"></a> ## (prin1 \[expression \[file-descriptor\]\]) --- Print it exactly the way it looks. --- This function prints data to the screen or to a file. When a *file-descriptor* is provided, LISP prints to a file; when the *file-descriptor* is missing, LISP prints to the GstarCAD® **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. Only the *expression* is printed, no new line or space is included. The **prin1** function can be used with no arguments to return a null string, in which case an empty file is printed. ### Examples | Code | Prints | Returns | | --- | --- | --- | | (setq v1 222\) | | | | | | | | (**prin1** v1) | 222 | 222 | | (**prin1** 'v1) | V1 | V1 | | (**prin1** "Thank You") | "Thank you" | "Thank you" | | (**prin1** "Sample" f) | "Sample"(to file f) | "Sample" | | (**prin1** "\\nName:") | "\\nName:" | "\\nName:" | ### NOTES - Use the **prin1** function at the end of a LISP routine to suppress the display of **nil** when the routine finishes running: (prin1) - The difference between the **prin1** function and LISP's other print-related functions (for example, [princ](%28princ%20-expression%20-file-descriptor-%29.md) and [print](%28print%20-expression%20-file-descriptor-%29.md)) is that **prin1** treats control characters literally. - GstarCAD does not support Unicode. **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 2011](../../../../2011/Developer%20Reference/AutoLISP%20Reference/LISP%20Functions/%28prin1%20-expression%20-file-descriptor-%29.md)