root/tags/lgt291/library/comparingp.lgt

Revision 2, 1.2 KB (checked in by pmoura, 7 years ago)

Initial revision

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1
2:- protocol(comparingp).
3
4
5    :- info([
6        version is 1.0,
7        authors is 'Paulo Moura',
8        date is 2000/7/24,
9        comment is 'Comparing protocol using overloading of standard operators.']).
10
11
12    :- public((<)/2).
13
14    :- mode(<(+term, +term), zero_or_one).
15
16    :- info((<)/2, [
17        comment is 'True if Term1 is less than Term2.',
18        argnames is ['Term1', 'Term2']]).
19
20
21    :- public((=<)/2).
22
23    :- mode(=<(+term, +term), zero_or_one).
24
25    :- info((=<)/2, [
26        comment is 'True if Term1 is less or equal than Term2.',
27        argnames is ['Term1', 'Term2']]).
28
29
30    :- public((>)/2).
31
32    :- mode(>(+term, +term), zero_or_one).
33
34    :- info((>)/2, [
35        comment is 'True if Term1 is greater than Term2.',
36        argnames is ['Term1', 'Term2']]).
37
38
39    :- public((>=)/2).
40
41    :- mode(>=(+term, +term), zero_or_one).
42
43    :- info((>=)/2, [
44        comment is 'True if Term1 is equal or grater than Term2.',
45        argnames is ['Term1', 'Term2']]).
46
47
48    :- public((=:=)/2).
49
50    :- mode(=:=(+term, +term), zero_or_one).
51
52    :- info((=:=)/2, [
53        comment is 'True if Term1 is equal to Term2.',
54        argnames is ['Term1', 'Term2']]).
55
56
57    :- public((=\=)/2).
58
59    :- mode(=\=(+term, +term), zero_or_one).
60
61    :- info((=\=)/2, [
62        comment is 'True if Term1 is not equal to Term2.',
63        argnames is ['Term1', 'Term2']]).
64
65
66:- end_protocol.
Note: See TracBrowser for help on using the browser.