(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 Bricscad Prompt History window.

When you are printing to a file, the file must previously have been opened with the open 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

(prin1)

 

Tell me about...

(prompt string)

(setq symbol1 statement1 [symbol2 statement2] ...)

(terpri)

(write-line string [file-descriptor])

LISP Compatibility

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.