Skip

Skip[stream, type]
skips one object of the specified type in an input stream.

Skip[stream, type, n]
skips n objects of the specified type.

Details and OptionsDetails and Options

  • Skip behaves like Read, except that it returns Null when it succeeds in skipping the specified objects, and $Failed otherwise.

ExamplesExamplesopen allclose all

Basic Examples (1)Basic Examples (1)

A file of numbers:

Open a stream to read the file:

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

Read the first number:

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

Skip the second number:

In[4]:=
Click for copyable input
In[5]:=
Click for copyable input
Out[5]=

Close the stream:

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