procesch = process a file character by character Example. In the text file called mary there is a poem: Mary had a little lamb.. ?- start. File name= mary. m a r y h a ... true.
start:- write('File name= '),read(F),see(F),procesch,seen. procesch:- get0(C),proces1(C). proces1(-1):- !. proces1(C):- name(L,[C]),work(L),procesch. /* write each letter on a new line */ work(L):- write(L),nl.