iobuf.reader

function

Library: Buffers (OMIOBUF)
Import : omiobuf.xmd

Returns: a scannable input source for streaming data


Declaration
export external string source function 
    reader value buffer input-buffer


Purpose

Use the iobuf.reader function to read the data previously written to the buffer passed to it.

Example

The following program uses an instance of iobuf.reader to write data to an instance of iobuf.buffer, and subsequently output it.

  import "omiobuf.xmd" prefixed by io.
  
  process
     local io.buffer b
  
     using output as io.writer of b
        output "Hello, World!%n"
  
     output io.reader of b

Usage Note

To use iobuf.reader, you must import OMIOBUF into your program using an import declaration such as:

  import "omiobuf.xmd" prefixed by io.

Other Library Functions