Difference between revisions of "ReadFileByte"
From SCAR Divi Manual
(Created page with "==Definition== <source lang="scar" lines="false"> function ReadFileByte(FileNum: Integer; var b: Byte): Boolean; </source> ==Availability== SCAR Divi 3.00 > Current ==Descripti...") |
|||
Line 35: | Line 35: | ||
==See Also== | ==See Also== | ||
*[[WriteFileByte]] | *[[WriteFileByte]] | ||
− | *[[ | + | *[[ReadFileString]] |
− | *[[ | + | *[[ReadFileInt]] |
*[[OpenFile]] | *[[OpenFile]] | ||
*[[CloseFile]] | *[[CloseFile]] |
Latest revision as of 13:27, 4 July 2011
Definition
function ReadFileByte(FileNum: Integer; var b: Byte): Boolean;
Availability
SCAR Divi 3.00 > Current
Description
Reads a byte from an open file stream associated with the index FileNum in the file stream resource manager and returns it in b. Returns false if the reading failed or the index FileNum is invalid. The file stream should have been created with OpenFile.
Example
var f: Integer; b: Byte; begin f := Rewritefile(LogsPath + 'Test.txt', False); WriteFileByte(f, 127); CloseFile(f); f := OpenFile(LogsPath + 'Test.txt', False); ReadFileByte(f, b); WriteLn(b); CloseFile(f); DeleteFile(LogsPath + 'Test.txt'); end.
Output:
127