Generic Function | Package: excl | ToC | DocOverview | CGDoc | RelNotes | FAQ | Index | PermutedIndex
| Allegro CL version 9.0 Unrevised from 8.2 to 9.0. 8.2 version

## device-file-position

Arguments: stream

Returns a positive integer that is the current octet (8-bit byte) position of the device represented by the argument stream, or else `nil` if this position cannot be determined.

This generic function is setfable. The position of the stream device is changed to reflect the value given, if possible. The value given may be either a positive integer designating the position from the start of the file, or else a negative integer, whose one's complement designates the position backwards from the end of the file. Thus, for example, -1 denotes the end of the file, -2 denotes the last octet from the end of file, -3 denotes 2 octets from the end of the file, etc.

### Defined methods

These apply to device-file-position and its setf.

- On class: `simple-stream`: the current position in the buffer is returned or set.
- On class: `string-simple-stream`: the length of the string is returned or set. (On `fill-pointer-output-simple-stream`, the fill-pointer is used).
- On class: `file-simple-stream`: a seek operation is used to query or set the position.

See streams.htm for information on the simple-streams implementation in Allegro CL. The older but still supported Gray streams implementation is described in gray-streams.htm.

Copyright (c) 1998-2019, Franz Inc. Oakland, CA., USA. All rights reserved.
This page was not revised from the 8.2 page.
Created 2012.5.30.

|  | ToC | DocOverview | CGDoc | RelNotes | FAQ | Index | PermutedIndex
| Allegro CL version 9.0 Unrevised from 8.2 to 9.0. 8.2 version