title: swi prolog , how to read the data for the txt.file
body: <p>Can someone help me with my file reading predicate?</p>
  
  <pre><code>get_userinfo: write('\nEnter Name:'),
            readln(Name),
            write('\nEnter Gender:'),
            read(Gender),
            append('marriage.txt') ,
            write(personal(Name,Gender,Age,Attr)),nl,
            told.
  </code></pre>
  
  <p>This is my text file:</p>
  
  <pre><code>personal(chong,male).
  personal(jack,female).
  personal(kk,male).
  </code></pre>