Home > Language Reference > Classes > Stream
Position Property
Stream pointer position.
Syntax
Public Property Get Position() As Long
Public Property Let Position(ByVal lNewPos As Long)
| Parameter | Description |
| lNewPos | New position of the stream pointer. |
Remarks
The Position property returns or modifies the current position of the stream pointer. It can only be used on StreamMemory, StreamRecord, StreamFile, StreamFileDB, StreamComposite and StreamNull objects. On all other types of stream, it causes a runtime error.
The pointer position is always expressed in bytes. It must be between 0 and the value returned by the Size property.
A frequent programming error is to confuse the position of the stream pointer and the number of elements written in the stream. The position is expressed in bytes and must take into account the size of each element in its calculation. For example, if you write an Integer, a Double and a Date into a stream, the first element will be found at position 0, the second at position 2 and the last at position 10 whilst the total size will be 14 bytes.
System requirements
| System | Minimal version | Remarks |
| Palm OS | Palm OS 3.0 | N/A |