swirl
Guide to OmniMark 8   OmniMark home
docs home 
IndexConceptsTasksSyntaxLibrariesLegacy LibrariesErrors
 
  Related Syntax     Other Library Functions  
function  

iobuf.reader

 
 

Library: Buffers (OMIOBUF)
Import: omiobuf.xmd
Return type: String source

Returns: A scannable input source for streaming data.


Declaration

export external string source function reader value buffer buf



Purpose

Use the buffer external string source function to read the data previously written to the buffer passed to it.

Usage Note

To use reader, you must import omiobuf.xmd into your program using a statement like this:

  import "omiobuf.xmd" prefixed by io.

(Please see the import topic for more on importing.)

Example


  ; Open a buffer and attach it to a stream.  Write data to the
  ; buffer via the stream.  Close it, and then use the data by
  ; reading it from the buffer.
  import "omiobuf.xmd" prefixed by io.
  global io.buffer b
  global stream s
  process
     open s as io.writer of b
     ; write data to "s"
     close s
     output io.reader of b

    Related Syntax
   iobuf.buffer
   iobuf.writer
 
  Other Library Functions
   iobuf.buffer
   iobuf.reader
   iobuf.writer
 
 

Top [ INDEX ] [ CONCEPTS ] [ TASKS ] [ SYNTAX ] [ LIBRARIES ] [ LEGACY LIBRARIES ] [ ERRORS ]

OmniMark 8.2.0 Documentation Generated: March 13, 2008 at 3:27:39 pm
If you have any comments about this section of the documentation, please use this form.

Copyright © Stilo International plc, 1988-2008.