From dc6a6f6bd214e2009eabd924591840c96695fa8b Mon Sep 17 00:00:00 2001 From: pmoura Date: Mon, 16 Aug 2004 17:09:27 +0000 Subject: [PATCH] Logtalk 2.20.0 files. git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1115 b08c6af1-5177-4d33-ba66-4b1c6b8b522a --- Logtalk/manuals/refman/directives/uses2.html | 66 ++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 Logtalk/manuals/refman/directives/uses2.html diff --git a/Logtalk/manuals/refman/directives/uses2.html b/Logtalk/manuals/refman/directives/uses2.html new file mode 100644 index 000000000..d4a684ddd --- /dev/null +++ b/Logtalk/manuals/refman/directives/uses2.html @@ -0,0 +1,66 @@ + + + + + + + + + + Logtalk entity directive: uses/2 + + + + + + + +

uses/2

+ + +

Description

+ +
+
uses(Object, Predicates)
+

+Declares that all calls (made from predicates defined in the category or object containing the directive) to the specified predicates are to be interpreted as messages to the specified object. Thus, this directive may be used to simplify writing of predicate definitions by allowing the programmer to omit the Object:: prefix when using the predicates listed in the directive (as long as the predicate calls do not occur as arguments for user-defined metapredicates). +

+
+ +

Template and modes

+ +
+
uses(+object_identifier, +predicate_indicator_list)
+
+ + +

Examples

+ +
+
:- uses(list,
+    [append/3, member/2]).
+
+foo :-
+    ...,
+    findall(X, member(X, L), A),    % the same as: findall(X, list::member(X, L), A)
+    append(A, B, C),                % the same as: list::append(A, B, C)
+    ...
+
+
+ + + + + + + +