Hello, 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...
Heres my code :
readFichierEnt([],Fichier_Ent) :- read(end_of_file).
readFichierEnt(ExampleList,Fichier_Ent) :- read(X), write(X), readFichierEnt(ExampleList,Fichier_Ent).
If I provided traintest.txt as the input file I get :
sdfasdf1dfas3fas5end_of_file
whereas the file is :
classes([unacc, acc, good, vgood]).
sdfasdf1.
asdfas2.
dfas3.
fas4.
fas5.
df6.
Can anyone help me with this ? Thanks.