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.
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 and prin1) is that princ acts upon control characters.
Tell me about...
(setq symbol1 statement1 [symbol2 statement2] ...)
(write-line string [file-descriptor])
Programming Overview of LISP (LISt Processing) Language
Bricscad™ is commercialized by Bricsys NV. Bricsys NV and Vondle NV are fully owned subsidiaries of Menhirs NV. © 2001- Menhirs NV - All rights reserved. |