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 @@ + + + + + + + +
+ +uses/2
++ +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). +
++ + +uses(+object_identifier, +predicate_indicator_list)+
++ + + +:- 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) + ... ++