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.

*standard-output*

*standard-output*

type: system variable 
location: built-in
source file: xlinit.c
Common LISP compatible: yes
supported on: all machines

SYNTAX

*standard-output*

DESCRIPTION

*STANDARD-OUTPUT* is a system variable that contains a file pointer that points to the file where all normal printing and messages from XLISP will go. The default file for *STANDARD-OUTPUT* is the system standard output device - normally the screen display/crt.

EXAMPLES

*standard-output*                       ; returns #<File-Stream: #24406>
(setq old-so *standard-output*)         ; save the file pointer
(setq fp (open "f" :direction :output)) ; open a new output file
(setq *standard-output* fp)             ; change where output goes
                                        ;
(+ 2 2)                                 ; you won't see any messages
                                        ; just the echo of input line
                                        ;
(setq *standard-output* old-so)         ; restore standard output
(close fp)                              ; close file

NOTE: Be careful when modifying the *STANDARD-OUTPUT*, you will not be able to see what you are doing. If you do not save the old file pointer, you will not be able to return to normal operation and will need to exit XLISP.


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