READPOS

Synopsis
READPOS
Description

Outputs the file character position of the current read stream file as a number. An output value of 0 means that the read position is at the beginning of the stream.

Example
OPENWRITE "dummy.fil
SETWRITE "dummy.fil
PRINT "Hello
PRINT [Good Bye]
SETWRITE []
CLOSE "dummy.fil

OPENREAD "dummy.fil
SETREAD "dummy.fil
REPEAT 2 [SHOW READPOS SHOW READLIST]
0
[Hello]
7
[Good Bye]
SETREAD []
CLOSE "dummy.fil

SourceForge.net Logo