Structural Informatics Group (SIG) logo
Home | Projects | Demos | Downloads | Publications | Local Info | About Us | New site
Go to the first, previous, next, last section, table of contents.

prin1

prin1

type: function (subr) 
location: built-in
source file: xlfio.c  and  xlprin.c
Common LISP compatible: yes
supported on: all machines

SYNTAX

(prin1  <expr>  [ <destination> ] )
        <expr>          -       an expression
        <destination>   -       an optional destination - must be a file pointer
                                or stream, the default is *standard-output*

DESCRIPTION

The PRIN1 function prints the <expr> to the specified <destination>. The <expr> is printed without a new-line. If <expr> is a string, it will be printed with quotes around the string. The <expr> is returned as the result. The <destination> may be a file pointer or a stream. If there is no <destination>, *STANDARD-OUTPUT* is the default. The TERPRI function is used to terminate the print lines produced.

EXAMPLES

(prin1 'a)                              ; prints  A     without <NL>
(prin1 '(a b))                          ; prints  (A B) without <NL>
(prin1 2.5)                             ; prints  2.5   without <NL>
(prin1 "hi")                            ; prints  "hi"  without <NL>
                                        ;
(setq f (open "f" :direction :output))  ; create file 
(prin1 "hi" f)                          ; returns "hi"
(prin1 1234 f)                          ; returns 1234
(prin1 "he" f)                          ; returns "he"
(close f)                               ; file contains <"hi"1234"he"> 

COMMON LISP COMPATIBILITY: Common LISP specifies that print operations with a <destination> of NIL, will go to *STANDARD-OUTPUT*. XLISP does not send the output to *STANDARD-OUTPUT* with a <destination> of NIL. Common LISP also specifies that a <destination> of T will be sent to *TERMINAL-IO*. XLISP does not allow T as a valid argument for <destination>.


Go to the first, previous, next, last section, table of contents.