Next: Closing, Previous: Reading, Up: Input and Output
[Generic procedures for writing to ports.]
Return the print state of the port port. If port has no associated print state, return
#f.
Send a representation of obj to current-output-port. Optional second arg port specifies an alternative output port. The representation is similar to that produced by
write(REFFIXME), the differences being strings are not quoted (and their characters are not escaped), and characters are rendered as if withwrite-char.
Send a newline to port. If port is omitted, send to the current output port.
Create a new port which behaves like port, but with an included print state pstate.
Option interface for the print options. Instead of using this procedure directly, use the procedures
print-enable,print-disable,print-set!andprint-options.
Write message to destination, defaulting to the current output port. message can contain
~A(or~a) and~S(or~s) escapes. When printed, the escapes are replaced with corresponding members from args:~Aformats usingdisplayand~Sformats usingwrite.Additionally,
~~results in a single tilde,~%a newline, and any other character following tilde, unless that tilde is the last character in message, signals an "unsupported format option" error. Signal "missing argument" error if there are more~Aand~Sescapes than there are args. However, the opposite (more args than substituting escapes) is ok. In that case, silently ignore leftover args.If destination is
#t, then use the current output port, if destination is#f, then return a string containing the formatted text.
Send character chr to port.
Flush the specified output port, or the current output port if port is omitted. The current output buffer contents are passed to the underlying port implementation (e.g., in the case of fports, the data will be written to the file and the output buffer will be cleared). It has no effect on an unbuffered port.