FileTools[Text]
ReadString
read a string from a file
Calling Sequence
Parameters
Description
Examples
ReadString(file)
file
-
file descriptor or filename
The ReadString(file) command reads a whitespace delimited string from file.
If file is the name of a file that has not been opened, Maple attempts to open the file before reading the character.
An error is raised if file is not a valid descriptor or if it is the name of a file that cannot be opened.
If the end of the file has been reached, ReadString returns NULL. To determine if the end of file has been reached, use AtEndOfFile.
FileToolsTextWriteStringtestfile,This is a test\n
15
FileToolsTextClosetestfile:
FileToolsTextReadStringtestfile
This
is
a
test
See Also
FileTools[AtEndOfFile]
FileTools[Text][Close]
FileTools[Text][Open]
FileTools[Text][ReadCharacter]
FileTools[Text][WriteCharacter]
FileTools[Text][WriteString]
IO_errors
Download Help Document