chickadee » scheme » current-input-port

current-input-port #!optional portprocedure
current-output-port #!optional portprocedure

Returns the current default input or output port.

If the optional port argument is passed, the current input or output port is changed to the provided port. It can also be used with parameterize to temporarily bind the port to another value. This is a CHICKEN extension to the R5RS standard.

Note that the default output port is not buffered. Use set-buffering-mode! if you need a different behavior.