XLISP *standard-output*

Nyquist / XLISP 2.0 - Contents | Tutorials | Examples | Reference

# *standard-output*

Type: | - | system variable
Source: | - | xlinit.c

## Syntax

*standard-output*

## Description

The *standard-output* system variable 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.

## 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.

See the *standard-output* system variable in the XLISP 2.0 manual.

Back to Top

Nyquist / XLISP 2.0 - Contents | Tutorials | Examples | Reference