2.6 Online Help

SWI-Prolog provides an online help system that covers this manual. If the XPCE graphics system is available, online help opens a graphical window. Otherwise the documentation is shown in the Prolog console. The help system is controlled by the predicates below. Note that this help system only covers the core SWI-Prolog manual. The website9http://www.swi-prolog.org provides an integrated manual that covers the core system as well as all standard extension packages. It is possible to install the SWI-Prolog website locally by cloning the website repository git://www.swi-prolog.org/home/pl/git/plweb.git and following the instructions in the README file.

help
Equivalent to help(help/1).
help(+What)
Show specified part of the manual. What is one of:
<Name>/<Arity> Give help on specified predicate
<Name> Give help on named predicate with any arity or C interface function with that name
<Section> Display specified section. Section numbers are dash-separated numbers: 2-3 refers to section 2.3 of the manual. Section numbers are obtained using apropos/1.

Examples:

?- help(assert). Give help on predicate assert
?- help(3-4). Display section 3.4 of the manual
?- help('PL_retry').Give help on interface function PL_retry()

See also apropos/1 and the SWI-Prolog home page at http://www.swi-prolog.org, which provides a FAQ, an HTML version of the manual for online browsing, and HTML and PDF versions for downloading.

apropos(+Pattern)
Display all predicates, functions and sections that have Pattern in their name or summary description. Lowercase letters in Pattern also match a corresponding uppercase letter. Example:
?- apropos(file). Display predicates, functions and sections that have `file' (or `File', etc.) in their summary description.
explain(+ToExplain)
Give an explanation on the given `object'. The argument may be any Prolog data object. If the argument is an atom, a term of the form 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.
explain(+ToExplain, -Explanation)
Unify Explanation with an explanation for ToExplain. Backtracking yields further explanations.