Sign in Join
FPDoc Onlineexperiment

TIOStream.Read function

Member of TIOStreampublicIn unit IoStream

Read data from the stream.

Declaration

pascal
function Read(var Buffer; Count: LongInt): LongInt; override

Arguments

Buffer

Memory buffer for the read data.

Count

Number of bytes to read.

Function result

The number of bytes actually read.

Description

Read checks first whether the type of the stream allows reading (type is iosInput). If not, it raises a EIOStreamError exception. If the stream can be read, it calls the inherited Read to actually read the data.

Errors

An EIOStreamError exception is raised if the stream does not allow reading.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.