Function Entry: PRINT
← Prev | ↑ Chapter | Next → | Index | Symbols
Function Entry: PRINT
Name
print
Class
Function
Syntax
(print [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
Same behaviour as prin1 (control-character escapes; round-trippable representation), but with a leading newline before expression and an extra space afterwards.
Return Values
Returns the evaluated value of expression.
Side Effects
Writes one newline, the printed representation of expression, then a single trailing space.
Examples
With (setq x 123):
(print x)prints<newline>123to the command line and returns123.(print x fh)writes<newline>123to file handlefhand returns123.
Tested Behaviour (BricsCAD V26 / macOS, 2026-04-26)
(print "hello" file-desc) returns "hello" and writes the nine characters \n"hello" (literal newline, then the round-trippable seven characters of prin1, then a single trailing space) to the file. Confirms the framing rule from the vendor page.
Availability
- AutoCAD 2026: documented (Autodesk reference page).
- BricsCAD V26: documented + product-tested on macOS (probe suite, 2026-04-26). Leading-newline / trailing-space framing confirmed empirically.
- Status: documented in both vendors and tested against BricsCAD V26 / macOS.
See Also
- probe-output.lsp — executable Phase-5 probe suite.
- probe results, BricsCAD V26 / macOS, 2026-04-26.
prin1for the unframed round-trippable form.
Source Notes
- [print (AutoLISP 2026)](https://help.autodesk.com/cloudhelp/2026/ENU/AutoCAD-AutoLISP-Reference/files/GUID-4EE74BA9-6ED4-4734-9C47-90A81E0B0971.htm)
- [print (BricsCAD V26 DevRef)](https://developer.bricsys.com/bricscad/help/en_US/V26/DevRef/source/print.htm)
- Status: documented (Phase 5 closure).
clautolisp: how a real prints
As prin1 (see its "Measured" and "clautolisp" notes): the AutoCAD dialects
print a real as AutoCAD (0.333333), the BricsCAD dialects as BricsCAD
(0.333333333333333), clautolisp / strict / lax in clautolisp's own
spelling; a [real-format] notice the first time the products differ.
clautolisp: an explicit NIL file
clautolisp implementation deviation – not part of the normative
specification above. (print x nil) follows the same per-dialect rule as
princ (see its "Tested Behaviour (explicit NIL file)" and "clautolisp: an
explicit NIL file"): an error and a [printer-nil-file] warning under
--dialect autocad, as AutoCAD 2022 does; output to the command line,
warned under --strict, silent under the other dialects.