close-port -- r7rs Definition procedure;
close-port (from vonuvoli);Procedure variants:
((input-port-open) -> (undefined))
input-port-open;undefined;((input-port-closed) -> (undefined))
input-port-closed;undefined;((output-port-open) -> (undefined))
output-port-open;undefined;((output-port-closed) -> (undefined))
output-port-closed;undefined;scheme:base -- (scheme base);scheme -- (scheme);(close-port port) (close-input-port port) (close-output-port port)Closes the resource associated with
port, rendering theportincapable of delivering or accepting data. It is an error to apply the last two procedures to a port which is not an input or output port, respectively. Scheme implementations may provide ports which are simultaneously input and output ports, such as sockets; theclose-input-portandclose-output-portprocedures can then be used to close the input and output sides of the port independently.These routines have no effect if the port has already been closed.
The text herein was sourced and adapted as described in the "R7RS attribution of various text snippets" appendix.