Maple Professionel
Maple Académique
Maple Edition Étudiant
Maple Personal Edition
Maple Player
Maple Player for iPad
MapleSim Professionel
MapleSim Académique
Maple T.A. - Suite d'examens de classement
Maple T.A. MAA Placement Test Suite
Möbius - Didacticiels de mathématiques en ligne
Machine Design / Industrial Automation
Aéronautique
Ingénierie des véhicules
Robotics
Energie
System Simulation and Analysis
Model development for HIL
Modélisation du procédé pour la conception de systèmes de contrôle
Robotics/Motion Control/Mechatronics
Other Application Areas
Enseignement des mathématiques
Enseignement de l’ingénierie
Enseignement secondaire et supérieur (CPGE, BTS)
Tests et évaluations
Etudiants
Modélisation financière
Recherche opérationnelle
Calcul haute performance
Physique
Webinaires en direct
Webinaires enregistrés
Agenda des évènements
Forum MaplePrimes
Blog Maplesoft
Membres Maplesoft
Maple Ambassador Program
MapleCloud
Livres blancs techniques
Bulletin électronique
Livres Maple
Math Matters
Portail des applications
Galerie de modèles MapleSim
Cas d'Etudes Utilisateur
Exploring Engineering Fundamentals
Concepts d’enseignement avec Maple
Centre d’accueil utilisateur Maplesoft
Centre de ressources pour enseignants
Centre d’assistance aux étudiants
writeto - write output to a file
appendto - append output to a file
Calling Sequence
writeto(fileName)
appendto(fileName)
Parameters
fileName
-
name or string; name of the file to use
Description
The writeto(fileName) function writes the output of all subsequently entered Maple commands into the file fileName.
When the command writeto(fileName) is entered, all subsequent commands have their results immediately stored in fileName. The results of these commands are not displayed on the screen. The command prompt and the input statements are also echoed into fileName (unless echoing is turned off via interface(echo=0) ).
The special command writeto(terminal) restores the standard mode of printing the results on the terminal.
If fileName already exists, the contents of the file are overwritten.
An alternative method of writing to a file is available by using the appendto(fileName) function. Rather than overwriting the contents (if any) of fileName, the new output is appended to fileName.
Thread Safety
The writeto and appendto commands are thread safe as of Maple 15, however their effect is global, thus the most recent call will be in effect.
If you want to call writeto or appendto to capture the output from multiple threads, your code must guarantee that outputting does not begin until after the call occurs. Further you must guarantee that all outputting is complete before appendto or writeto is called a second time, otherwise some output may be written to the wrong file.
Examples
Create a new file called MapleEx.txt and copy all subsequently entered Maple commands and results into the file.
The standard mode of printing the results on the terminal has been restored.
The appendto command will not overwrite the contents of MapleEx.txt.
See Also
echo, filenames, save
Download Help Document