Difference between revisions of "WriteFileString"
From SCAR Divi Manual
(Created page with "==Definition== <source lang="scar" lines="false"> function WriteFileString(FileNum: Integer; const s: string): Boolean; </source> ==Availability== SCAR Divi 3.00 > Current ==De...") |
|||
(One intermediate revision by the same user not shown) | |||
Line 34: | Line 34: | ||
==See Also== | ==See Also== | ||
+ | *[[ReadFileString]] | ||
*[[WriteFileByte]] | *[[WriteFileByte]] | ||
*[[WriteFileInt]] | *[[WriteFileInt]] | ||
*[[RewriteFile]] | *[[RewriteFile]] | ||
+ | *[[AppendFile]] | ||
*[[CloseFile]] | *[[CloseFile]] | ||
[[Category:Functions]] | [[Category:Functions]] | ||
[[Category:File Functions]] | [[Category:File Functions]] |
Latest revision as of 23:24, 2 November 2011
Definition
function WriteFileString(FileNum: Integer; const s: string): Boolean;
Availability
SCAR Divi 3.00 > Current
Description
Writes a string s 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: Integer; s: string; begin f := Rewritefile(LogsPath + 'Test.txt', False); WriteFileString(f, 'Hello World!'); CloseFile(f); f := OpenFile(LogsPath + 'Test.txt', False); ReadFileString(f, s, FileSize(f)); WriteLn(s); CloseFile(f); DeleteFile(LogsPath + 'Test.txt'); end.
Output:
Hello World!