home *** CD-ROM | disk | FTP | other *** search
Prolog Source | 1986-10-07 | 580 b | 28 lines |
- /* Program 44 */
- /*
- Enter a file name, like EXAMPL43.PRO, and
- explore it with this program.
- */
-
- domains
- file = input
-
- predicates
- start
- inspect_positions
-
- goal
- start.
-
- clauses
- start:-
- write("Which file do you want to \nwork with ? "),
- readln(FileName),
- openread(input,FileName),
- inspect_positions.
- inspect_positions:-
- readdevice(keyboard),nl,write("Position Number:"),
- readreal(X),
- readdevice(input),filepos(input,X,0),readchar(Y),
- write(Y),inspect_positions.
-