set-current-input-port!

[procedure] set-current-input-port! port

[procedure] set-current-output-port! port

[procedure] set-error-output-port! port

Scsh: alter the current input/output/error port. See also with-current-input-port*, with-current-output-port*, with-error-output-port*

Some implementations have with-input-from-port, with-output-to-port and with-error-to-port/with-error-output-to-port to alter the current ports.

ChezScheme's current-input-port and current-output-port has this feature.

Guile has set-current-input-port, set-current-output-port and set-current-error-port.