This is documentation for Mathematica 3, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)
 Documentation / Mathematica / Built-in Functions / Input and Output / File Output  /
Close

  • Close[ stream ] closes a stream.
  • The argument to Close can be an InputStream or OutputStream object.
  • If there is only one stream with a particular name, the argument to close can be " name ".
  • See the Mathematica book: Section 2.11.3.
  • See also: OpenAppend, SetOptions, Streams.

    Further Examples

    This opens an output stream for the file strings.

    In[1]:=

    Out[1]=

    This closes the stream.

    In[2]:=

    Out[2]=