EndOfFile

EndOfFile
is a symbol returned by Read when it reaches the end of a file.

DetailsDetails

ExamplesExamplesopen allclose all

Basic Examples (1)Basic Examples (1)

Read returns EndOfFile after it reaches the end of a file:

In[1]:=
Click for copyable input
In[2]:=
Click for copyable input
Out[2]=

All subsequent calls to Read will give EndOfFile:

In[3]:=
Click for copyable input
Out[3]=

Close the file:

In[4]:=
Click for copyable input
Out[4]=
New in 1
New to Mathematica? Find your learning path »
Have a question? Ask support »