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


Guile Reference Manual

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

27.10.1.5 Reading from a port.

To read from a port, it's possible to either call existing libguile procedures such as scm_getc and scm_read_line or to read data from the read buffer directly. Reading from the buffer involves the following steps:

  1. Flush output on the port, if rw_active is SCM_PORT_WRITE.

  2. Fill the read buffer, if it's empty, using scm_fill_input.

  3. Read the data from the buffer and update the read position in the buffer. Steps 2) and 3) may be repeated as many times as required.

  4. Set rw_active to SCM_PORT_READ if rw_random is set.

  5. update the port's line and column counts.


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