/
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