FileRead
Previous  Top  Next

Prototype

IntByte:=FileRead (intFileHandle)

Description

It reads a byte from file.

Parameters

IntFileHandle
: integer value corresponding to the file handle.

Returned value

IntByte
: integer value between 0 and 255.

Notes

None.

Example

// It opens the file
FirstFile:=FileOpen('c:\files\unfile');

// It opens another file
SecondFile:=FileOpen('c:\files\SecondFile');

// It places itself in the first file
FileSeek(FirstFile, 1);

// It reads a byte from the first file
ByteRead:=FileRead(FirstFile);

// It places itself in the second file
FileSeek(SecondoFile, 1);

// It writes a byte in the second file
FileWrite(SecondFile,ByteRead);

// It closes the first file
FileClose(FirstFile);

// It closes the second file
FileClose(SecondFile);