/
readWord
readWord
Description
Use to read a word from a file. Command will fail if at the end of the file.
Functional area
Disk I/O
Command syntax
Syntax
readWord fileID |
Arguments
Name | Type | Required | Comments |
---|---|---|---|
fileID | int | ID of file previously opened with fileOpen |
Flags
None
Return value
string
Examples
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;
Additional information
Related commands
, multiple selections available,
Related content
readLine
readLine
More like this
readToken
readToken
More like this
seekToString
seekToString
More like this
readInt
readInt
More like this
readBool
readBool
More like this
isFileReadable
isFileReadable
More like this