WriteFileInt
From SCAR Divi Manual
Definition
function WriteFileInt(FileNum: Integer; i: Integer): Boolean;
Availability
SCAR Divi 3.00 > Current
Description
Writes a Integer i to an open file stream with writing privileges associated with the index FileNum in the file stream resource manager. Returns false if the writing failed or the index FileNum is invalid. The file stream should have been created with RewriteFile.
Example
var f, i: Integer; begin f := Rewritefile(LogsPath + 'Test.txt', False); WriteFileInt(f, 12345); CloseFile(f); f := OpenFile(LogsPath + 'Test.txt', False); ReadFileInt(f, i); WriteLn(i); CloseFile(f); DeleteFile(LogsPath + 'Test.txt'); end.
Output:
12345