Next Previous Up Top Contents Index

5.11 The STREAMS module

stream-position-setter

Open generic function

Summary

Sets the position of a stream.

Signature

stream-position-setter position positionable-stream 
=> new-position

Arguments

position
An instance of <position-type>.

positionable-stream

An instance of <positionable-stream>.

Values

new-position
An instance of <stream-position>, or an instance of <integer>.

Library

io

Module

streams

Description

Changes the stream's position for reading or writing to position.

When it is an integer, if it is less than zero or greater than positionable-stream.stream-size this function signals an error. For file streams, a <stream-position-error> is signalled. For other types of stream, the error signalled is <simple-error>.

When position is a <stream-position>, if it is invalid for some reason, this function signals an error. Streams are permitted to restrict the position to being a member of the set of values previously returned by calls to stream-position on the same stream.

The position may also be #"start", meaning that the stream should be positioned at its start, or #"end", meaning that the stream should be positioned at its end.

Note: You cannot use stream-position-setter to set the position past the current last element of the stream: use adjust-stream-position instead.

See also

adjust-stream-position, page 59

<stream-position>, page 99


System and I/O Reference - 31 MAR 2000

Next Previous Up Top Contents Index