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>123 to the command line and returns 123.
  • (print x fh) writes <newline>123 to file handle fh and returns 123.

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