Unit 'AmigaDOS' Package
[Overview][Constants][Types][Procedures and functions][Variables][Index] [#morphunits]

FRead

Reads a number of blocks from an input (buffered)

Declaration

Source position: amigados.pas line 1845

function FRead(

  fh: LongInt;

  block: Pointer;

  blocklen: Cardinal;

  number: Cardinal

):LongInt;

Arguments

fh

  

filehandle to use for buffered I/O

block

  

Area to read bytes into.

blocklen

  

number of bytes per block. Must be > 0.

number

  

number of blocks to read. Must be > 0.

Function result

Number of _blocks_ read, or 0 for EOF. On an error, the number of blocks actually read is returned.

Description

Attempts to read a number of blocks, each blocklen long, into the specified buffer from the input stream. May return less than the number of blocks requested, either due to EOF or read errors. This call is buffered.

See also

FGetC

  

Read a character from the specified input (buffered)

FWrite

  

Writes a number of blocks to an output (buffered)

FGets

  

Reads a line from the specified input (buffered)


Documentation generated on: 2021-07-30