Close
Close window
ReadString - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Mozilla Firefox.
Maplesoft logo
Maplesoft logo

Online Help

All Products Maple MapleSim


[フレーム] [フレーム]

FileTools[Text]

ReadString

read a string from a file

Calling Sequence

ReadString(file)

Parameters

file

-

file descriptor or filename

Description

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 .

Examples

>

FileToolsTextWriteStringtestfile,This is a test\n

15

(1)
>

FileToolsTextClosetestfile:

>

FileToolsTextReadStringtestfile

This

(2)
>

FileToolsTextReadStringtestfile

is

(3)
>

FileToolsTextReadStringtestfile

a

(4)
>

FileToolsTextReadStringtestfile

test

(5)
>

FileToolsTextReadStringtestfile


Download Help Document

AltStyle によって変換されたページ (->オリジナル) /