home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / prolog / library / prolo_c / exampl44.pro < prev    next >
Text File  |  1986-10-06  |  580b  |  28 lines

  1. /* Program 44 */
  2. /*
  3.   Enter a file name, like EXAMPL43.PRO, and
  4.   explore it with this program.
  5. */  
  6.  
  7. domains
  8.     file = input
  9.  
  10. predicates
  11.     start
  12.     inspect_positions
  13.  
  14. goal
  15.     start.
  16.  
  17. clauses
  18.     start:-
  19.         write("Which file do you want to \nwork with ? "),
  20.         readln(FileName),
  21.         openread(input,FileName),
  22.         inspect_positions.
  23.     inspect_positions:-
  24.         readdevice(keyboard),nl,write("Position Number:"),
  25.         readreal(X),
  26.         readdevice(input),filepos(input,X,0),readchar(Y),
  27.         write(Y),inspect_positions.
  28.