title: Prolog Read Skips Lines?
body: <p>Im trying to read a file in gprolog, but I have a small problem, it seems to read a line, then skip one, then read the next one, etc...</p>
  
  <p>Heres my code : </p>
  
  <pre><code>readFichierEnt([],Fichier_Ent) :- read(end_of_file).
  readFichierEnt(ExampleList,Fichier_Ent) :- read(X), write(X), readFichierEnt(ExampleList,Fichier_Ent).
  </code></pre>
  
  <p>If I provided traintest.txt as the input file I get : </p>
  
  <pre><code>sdfasdf1dfas3fas5end_of_file
  </code></pre>
  
  <p>whereas the file is :</p>
  
  <pre><code>classes([unacc, acc, good, vgood]).
  sdfasdf1.
  asdfas2.
  dfas3.
  fas4.
  fas5.
  df6.
  </code></pre>
  
  <p>Can anyone help me with this ?
  Thanks.</p>