Function Entry: PRIN1
← Prev | ↑ Chapter | Next → | Index | Symbols
Function Entry: PRIN1
Name
prin1
Class
Function
Syntax
(prin1 [expression [fileHandle]])
Arguments and Values
expression(optional): any AutoLISP expression or value. If omitted, nil is used.fileHandle(optional): handle of a file as obtained from(open …). If omitted or nil, output goes to the command line.
Description
Prints expression to the command line, or writes it to the open file fileHandle. The representation is machine-readable: control characters in a string expression (\t, \n, \r, the escaped double-quote, octal \nnn) are written as their backslash escape sequences so that the output round-trips through the reader.
Return Values
Returns the evaluated value of expression. With no argument, (prin1) returns the void symbol value, useful as the last form in a defun to emit "nothing" to the command line.
Side Effects
Writes the printed representation to the command line or to fileHandle.
Examples
With (setq x 123):
(prin1 x)prints123to the command line and returns123.(prin1 x fh)writes123to file handlefhand returns123.
Tested Behaviour (BricsCAD V26 / macOS, 2026-04-26)
(prin1 "hello" file-desc) returns "hello" and writes the seven characters "hello" (the literal seven, including the surrounding double quotes — i.e. the round-trippable representation) to the file. The 2-argument form is fully accepted by BricsCAD V26.
Availability
- AutoCAD 2026: documented (Autodesk reference page).
- BricsCAD V26: documented + product-tested on macOS (probe suite, 2026-04-26). 2-argument form accepted; output is round-trippable.
- Status: documented in both vendors and tested against BricsCAD V26 / macOS.
See Also
- probe-output.lsp — executable Phase-5 probe suite for the printer surface.
- probe results, BricsCAD V26 / macOS, 2026-04-26.
princfor display-oriented output (no escape rewriting).printfor the bracketed prin1 + leading newline + trailing space form.
Source Notes
- [prin1 (AutoLISP 2026)](https://help.autodesk.com/cloudhelp/2026/ENU/AutoCAD-AutoLISP-Reference/files/GUID-BF4CEE45-BB6F-443B-A588-A40D9BCE378F.htm)
- [prin1 (BricsCAD V26 DevRef)](https://developer.bricsys.com/bricscad/help/en_US/V26/DevRef/source/prin1.htm)
- Status: documented and product-tested (Phase 5 closure).