This is documentation for Mathematica 5, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)

Documentation / Mathematica / Built-in Functions / Input and Output / File Output /


FilledSmallSquare expr >> filename writes expr to a file.

FilledSmallSquare Put[, , ... , "filename"] writes a sequence of expressions to a file.

FilledSmallSquare On systems with advanced graphical interfaces, there will usually be graphical tools for saving expressions in files.

FilledSmallSquare Put uses the format type InputForm by default.

FilledSmallSquare Put starts writing output at the beginning of the file. It deletes whatever was previously in the file.

FilledSmallSquare Put inserts a newline (line feed) at the end of its output.

FilledSmallSquare expr >> filename is equivalent to expr >> "filename". The double quotes can be omitted if the file name is of the form specified in Section A.2.7.

FilledSmallSquare It is conventional to use names that end with .m for files containing Mathematica input.

FilledSmallSquare See Section 1.11.1, Section 1.11.10 and Section 2.12.1.

FilledSmallSquare See also: PutAppend, Save, Definition, DumpSave, Export, Get, NotebookPut.

FilledSmallSquare New in Version 1.

Further Examples