next up previous index
Next: Define Up: Utility Libraries Previous: Utility Libraries

Util

The library is loaded using

:- lib(util).
and it current contains the following predicates:

add_path(+Directory)

  The argument must be a string which is the name of a directory. This directory will be added at the beginning of the library path.

add_suffix(+Suffix)

  The argument must be a string which denotes a file name suffix that will be added at the beginning of the prolog_suffix list.

between(+From, +To, ?I)

  Succeeds if From and To are integers and I unifies with a number between the two. On backtracking it generates all values for I starting from From onwards.

compiled

  List all currently compiled files and indicate if they have been modified since they were compiled.

list_error(+String, -ErrNo, -ErrMsg)

  Find the event number whose message contains the specified substring.

ptags_all

  Make a ptags file for all .pl files in the current directory.

read_line(-String)

  Defined as

read_line(String) :-
        read_string(input, "\n", Length, String).
It reads a line from the input stream into a string.

read_line(+Stream, -String)

  Like the previous but reads from a specified stream.

stat(+File)

  Print port statistics into the specified file with a .stat suffix and mode statistics the file with .mode suffix (cf. chapter gif and print_statistics/0).

stream(+Stream)

  List all information about the specified I/O stream.

streams

  List all currently opened streams.

time(+Goal)

  Call the goal Goal, measure its runtime (cputime) and print the result after success or failure.

write_history

  Writes the current history into the .eclipse_history file.  



next up previous index
Next: Define Up: Utility Libraries Previous: Utility Libraries



Micha Meier
Mon Mar 4 12:11:45 MET 1996