Close
Close window
Formats/Text - 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


Home : Support : Online Help : Formats/Text
[フレーム] [フレーム]

Text (.txt) File Format

TXT file format

Description

A plain text file is a universal format for textual information.

The Export as Plain Text command in the File menu can be used to export a document to a text file.

The Import and Export commands can be used to read and write to text files.

The FileTools[Text] package can be used for more advanced processing of text files.

Notes

Content-Type: text/plain

Examples

Import a text file into Maple as a string

>

storyImportexample/UnderTheMaples.txt,base=datadir

storyUnder The Maples, by John Burroughs Chapter I: The Falling Leaves The time of the falling of leaves has come again. Once more in our morning walk we tread upon carpets of gold and crimson, of brown and bronze, woven by the winds or the rains out of these delicate textures while we slept.

(1)
>

StringTools:-WordCountstory

54

(2)

The command FileTools:-Text:-ReadFile can accomplish the same task.

>

pathFileTools:-JoinPathexample,UnderTheMaples.txt,base=datadir

path/maple/cbat-build/active/297794/data/example/UnderTheMaples.txt

(3)
>

storyFileTools:-Text:-ReadFilepath

storyUnder The Maples, by John Burroughs Chapter I: The Falling Leaves The time of the falling of leaves has come again. Once more in our morning walk we tread upon carpets of gold and crimson, of brown and bronze, woven by the winds or the rains out of these delicate textures while we slept.

(4)


Download Help Document

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