Close
Close window
ReadCharacter - 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]

ReadCharacter

read a single character from a file

Calling Sequence

ReadCharacter(file)

Parameters

file

-

file descriptor or filename

Description

The ReadCharacter(file) command reads a single character from file. The character is returned as a string of length 1.

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 does not exists.

If the end of the file has been reached, ReadCharacter returns NULL.

Examples

>

FileToolsTextWriteStringfile,123

3

(1)
>

FileToolsTextClosefile:

>

FileToolsTextReadCharacterfile

1

(2)
>

FileToolsTextReadCharacterfile

2

(3)
>

FileToolsTextReadCharacterfile

3

(4)
>

FileToolsTextReadCharacterfile


Download Help Document

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