Next: Network streams, Previous: Read macros, Up: Input and output
The input and output functions of ECL almost follow the definitions in Chapter 22 of [see Steele:84]. Most of the differences come from the fact that, in ECL, input from the terminal is always in line mode and binary I/O is not supported.
In ECL, *terminal-io* is a two-way stream from the standard input
and to the standard output. The echoing to the terminal is performed by the
underlying operating system. In particular, when a disk file is assigned to
the standard output, nothing will be echoed at the terminal.
Those functions that deviate from the definitions in [see Steele:84] are listed below.
If pathname does not specify the filetype of the input file, then load uses the association list si::*load-search-list* to find out a suitable filetype and the function to load it. Typically, this search list is made of the elements
.fas,.lspand.lisp, in this order. If everything fails, a file without filetype will be loaded.
Streams can only have element type
base-char,(signed-byte 8)and(unsigned-byte 8). The:external-formatis always:default.
This routine requires some low level functions which are not available on all platforms (For instance on
Windows). When ECL is not able to determine whether a stream is interactive,listenreturns true unless an end of file has been previously detected.
The functions princ, write-char and write-byte do not
always flush the stream. The stream is flushed when
*terminal-io*