StreamPosition

StreamPosition[stream]

returns an integer that specifies the position of the current point in an open stream.

Details

  • On most computer systems, the integer returned by StreamPosition gives the position counting from the beginning of the file in bytes.

Examples

Basic Examples  (1)

Open a stream:

Read the first number from the stream object:

The position counting from the beginning of the stream:

Close the stream:

Wolfram Research (1991), StreamPosition, Wolfram Language function, https://reference.wolfram.com/language/ref/StreamPosition.html.

Text

Wolfram Research (1991), StreamPosition, Wolfram Language function, https://reference.wolfram.com/language/ref/StreamPosition.html.

CMS

Wolfram Language. 1991. "StreamPosition." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/StreamPosition.html.

APA

Wolfram Language. (1991). StreamPosition. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/StreamPosition.html

BibTeX

@misc{reference.wolfram_2022_streamposition, author="Wolfram Research", title="{StreamPosition}", year="1991", howpublished="\url{https://reference.wolfram.com/language/ref/StreamPosition.html}", note=[Accessed: 07-October-2022 ]}

BibLaTeX

@online{reference.wolfram_2022_streamposition, organization={Wolfram Research}, title={StreamPosition}, year={1991}, url={https://reference.wolfram.com/language/ref/StreamPosition.html}, note=[Accessed: 07-October-2022 ]}