XLISP > XLISP 2.0  -  Contents  -  Reference  -  Previous | Next

terpri


Type:   -   function (subr)
Source:   -   xlfio.c, xlprin.c

Syntax

(terpri [dest])
dest - an optional destination, must be a file pointer or stream, default is *standard-output*
returns - NIL

Description

The 'terpri' function prints a new-line to the specified 'destination' This will terminate the current print line for 'destination'. NIL is always returned as the result. The 'destination' may be a file pointer or a stream. If there is no 'destination', *standard-output* is the default.

Examples

(terpri)                                 ; prints  #\Newline

(setq f (open "pr" :direction :output))  ; create a file
(princ "hi" f)                           ; returns "hi"
(princ 727 f)                            ; returns 727
(princ "ho" f)                           ; returns "ho"
(terpri f)                               ; returns NIL
(close f)                                ; file contains hi727ho#\Newline

Common Lisp: 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*, which is not defined in XLISP by default. XLISP does not allow  T  as a valid argument for 'destination'.

See the terpri function in the XLISP 2.0 manual.

  Back to Top


XLISP > XLISP 2.0  -  Contents  -  Reference  -  Previous | Next