(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 IntelliCAD® 2001 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