Next Previous Up Top Contents Index

5.11 The STREAMS module

stream-size

Open generic function

Summary

Finds the number of elements in a stream.

Signature

stream-size positionable-stream => size 

Arguments

positionable-stream

An instance of <positionable-stream>.

Values

size
An instance of <integer>, or #f.

Library

io

Module

streams

Description

Returns the number of elements in positionable-stream.

For input streams, this is the number of elements that were available when the stream was created. It is unaffected by any read operations that might have been performed on the stream.

For output and input-output streams, this is the number of elements that were available when the stream was created (just as with input streams), added to the number of elements written past the end of the stream (regardless of any repositioning operations).

It is assumed that:

In such situations, the behavior of stream-size is undefined.


System and I/O Reference - 31 MAR 2000

Next Previous Up Top Contents Index