The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....



ReadByte


Unit: SDL_streams
Class: TMixedFStream
Declaration: function ReadByte (var error: boolean): byte;

The function ReadByte reads a (binary) byte value from the current stream position. On return, ReadByte provides the corresponding byte value; the property Position of the stream points to the first byte after the scanned number. If the variable parameter error returns TRUE this indicates an error during stream read (i.e. the end of the stream has been encountered prematurely).

Hint: In order to avoid reading data beyond the end of the stream, the user should call the function Eos before reading the stream data. Reading beyond the end of the stream will raise an exception.



Last Update: 2020-Feb-15