www.delorie.com/gnu/docs/guile/guile_315.html   search  
Buy GNU books!

Guile Reference Manual

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

27.8 Default Ports for Input, Output and Errors

Scheme Procedure: current-input-port
C Function: scm_current_input_port ()
Return the current input port. This is the default port used by many input procedures. Initially, current-input-port returns the standard input in Unix and C terminology.

Scheme Procedure: current-output-port
C Function: scm_current_output_port ()
Return the current output port. This is the default port used by many output procedures. Initially, current-output-port returns the standard output in Unix and C terminology.

Scheme Procedure: current-error-port
C Function: scm_current_error_port ()
Return the port to which errors and warnings should be sent (the standard error in Unix and C terminology).

Scheme Procedure: set-current-input-port port
Scheme Procedure: set-current-output-port port
Scheme Procedure: set-current-error-port port
C Function: scm_set_current_input_port (port)
C Function: scm_set_current_output_port (port)
C Function: scm_set_current_error_port (port)
Change the ports returned by current-input-port, current-output-port and current-error-port, respectively, so that they use the supplied port for input or output.

Scheme Procedure: set-current-output-port port
Set the current default output port to PORT.

Scheme Procedure: set-current-error-port port
Set the current default error port to PORT.

  webmaster     delorie software   privacy  
  Copyright 2003   by The Free Software Foundation     Updated Jun 2003