Use to read a word from a file. Command will fail if at the end of the file.
Disk I/O
readWord fileID |
Name | Type | Required | Comments |
---|---|---|---|
fileID | int | ID of file previously opened with fileOpen |
None
string
string $str; int $fileID; int $fileID = `fileOpen "C:/FileTesting.txt" "r"`; // Now read the string $str = `readWord $fileID`; // Print out the value print $str; fileClose $fileID; |