next up previous
Next: Using Modules Up: Built-In Predicates Previous: DDE server mode

Miscellaneous

dwim_match( +Atom1, +Atom2)

  Succeeds if Atom1 matches Atom2 in `Do What I Mean' sence. Both Atom1 and Atom2 may also be integers or floats. The two atoms match if:

dwim_match( +Atom1, +Atom2, -Difference)

  Equivalent to dwim_match/2, but unifies Difference with an atom identifying the the difference between Atom1 and Atom2. The return values are (in the same order as above): equal , mismatched_char , inserted_char , transposed_char , separated and transposed_word .
wildcard_match( +Pattern, +String)

  Succeeds if String matches the wildcard pattern Pattern. Pattern is very similar the the Unix csh pattern matcher. The patterns are given below:

Example:

?- wildcard_match('[a-z]*.{pro,pl}[%~]', 'a_hello.pl%').

Yes.
gensym( +Base, -Unique)

  Generate a unique atom from base Base and unify it with Unique. Base should be an atom. The first call will return <base>1, the next <base>2, etc. Note that this is no warrant that the atom is unique in the system. I plan to supply a real gensym/2 which does give this warrant for future versions.
sleep( +Time)

  Suspend execution Time seconds. Time is either a floating point number or an integer. Granularity is dependent on the system's timer granularity (1/60 seconds on most Unix systems). A negative time causes the timer to return immediately. As Unix is a multi-tasking environment we can only ensure execution is suspended for at least Time seconds.



Passani Luca
Tue Nov 14 08:58:33 MET 1995