This module provides help/1 and apropos/1 that give help on a topic or searches the manual for relevant topics.
By default the result of help/1
is sent through a pager such as
less
. This behaviour is controlled by the following:
PAGER
or otherwise tries
to find the less
program.program_name(Arg, ...)
.
For example, less('-r')
would be the default. Note that the
program name can be an absolute path if single quotes are used.topics(s)
to give help for. Notations for What
are:
?- help(append).
/
Arity//
ArityIf an exact match fails this predicates attempts fuzzy matching and, when successful, display the results headed by a warning that the matches are based on fuzzy matching.
If possible, the results are sent through a pager such as the
less
program. This behaviour is controlled by the Prolog
flag
help_pager
. See section level documentation.
:
Textsection
, cfunction
, function
,
iso_predicate
, swi_builtin_predicate
, library_predicate
,
dcg
and aliases chapter
, arithmetic
, c_function
,
predicate
, nonterminal
and non_terminal
.
For example:
?- apropos(c:close). ?- apropos(f:min).
The library(explain)
describes prolog-terms. The most
useful functionality is its cross-referencing function.
?- explain(subset(_,_)). "subset(_, _)" is a compound term from 2-th clause of lists:subset/2 Referenced from 46-th clause of prolog_xref:imported/3 Referenced from 68-th clause of prolog_xref:imported/3 lists:subset/2 is a predicate defined in /staff/jan/lib/pl-5.6.17/library/lists.pl:307 Referenced from 2-th clause of lists:subset/2 Possibly referenced from 2-th clause of lists:subset/2
Note that PceEmacs can jump to definitions and gxref/0 can be used for an overview of dependencies.
Name/Arity
or a term of the form Module:Name/Arity
, explain/1
describes the predicate as well as possible references to it. See also gxref/0.print_message(information, explain(Explanation))
.