FileWrite
Previous  Top  Next

Prototype

FileWrite (intFileHandle, intByte)

Description

Writes one byte inside one file.

Parameters

IntFileHandle: integer value that corresponds at the handle of the file.

IntByte :
integer value between 0 and 255.

Returned value

None.

Notes

None.

Example

// It checks if a file exists 
Esistente:=FileExists ('c:\files\unfile');

// If it doesn't exist it creates it 
If Esistente=False Then CreateFile('c:\files\unfile');

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

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

// It writes a byte inside the file 
FileWrite(UnFile,1);

// It closes the file
FileClose(UnFile);