Skip to content

Commit

Permalink
doc: improve section about InfoClasses
Browse files Browse the repository at this point in the history
  • Loading branch information
wilfwilson committed Sep 19, 2018
1 parent 94ead70 commit c3701c0
Showing 1 changed file with 27 additions and 14 deletions.
41 changes: 27 additions & 14 deletions doc/ref/debug.xml
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,21 @@ info classes defined in the ⪆ library usually covers a certain range
of algorithms, so for example <C>InfoLattice</C> covers all the cyclic extension
algorithms for the computation of a subgroup lattice.
<P/>
The amount of information to be displayed can be specified by the user for
each info class separately by a <E>level</E>, the higher the level the more
information will be displayed.
Ab initio all info classes have level zero except
<Ref Func="InfoWarning"/> which initially has level 1.
The amount of information to be displayed by each info class can be separately
specified by the user. This is done by selecting a non-negative integer
<E>level</E> for the info class: no information will be displayed at level 0,
and the higher the level, the more information that will be displayed.
At creation, an info class has level 0.
By default, all built-in GAP info classes have level 0, except for the following info classes, which have level 1:
<List>
<Item><Ref Func="InfoWarning"/>,</Item>
<Item><Ref Func="InfoPackageLoading"/>,</Item>
<Item><C>InfoDebug</C>,</Item>
<Item><C>InfoPerformance</C>,</Item>
<Item><C>InfoTempDirectories</C>,</Item>
<Item><C>InfoPrimeInt</C>, and</Item>
<Item><C>InfoSLP</C>.</Item>
</List>
<P/>
<ManSection>
<Oper Name="NewInfoClass" Arg='name'/>
Expand All @@ -129,7 +139,8 @@ readonly by this function.
<Oper Name="SetInfoLevel" Arg='infoclass, level'/>

<Description>
Sets the info level for <A>infoclass</A> to <A>level</A>.
Sets the info level for <A>infoclass</A> to the non-negative integer
<A>level</A>.
</Description>
</ManSection>
<P/>
Expand All @@ -145,13 +156,15 @@ returns the info level of <A>infoclass</A>.
<Func Name="Info" Arg='infoclass, level, info[, moreinfo ...]'/>

<Description>
If the info level of <A>infoclass</A> is at least <A>level</A> the remaining
arguments, <A>info</A> and possibly <A>moreinfo</A> and so on, are evaluated.
If the info level of <A>infoclass</A> is at least <A>level</A>, then the remaining
arguments, <A>info</A>, and possibly <A>moreinfo</A> and so on, are evaluated.
(Technically, <Ref Func="Info"/> is a keyword and not a function.)
<P/>
By default, they are
By default, the results of these evaluations are
viewed, preceded by the string <C>"#I "</C> and followed by a newline.
Otherwise the third and subsequent arguments are not evaluated.
<P/>
If the info level of <A>infoclass</A> is strictly less than <A>level</A>, then
the third and subsequent arguments are not evaluated.
(The latter can save substantial time when displaying difficult results.)
<P/>
The behaviour can be customized with <Ref Func="SetInfoHandler"/>.
Expand Down Expand Up @@ -208,12 +221,12 @@ gap> InfoLevel(InfoWarning);
<Func Arg="out" Name="SetDefaultInfoOutput" />
<Returns>nothing</Returns>
<Description>
This allows to customize what happens in an
This allows one to customize what happens in an
<C>Info(<A>infoclass</A>, <A>level</A>, ...)</C> statement.<P/>
In the first function <A>handler</A>
In the first function, <A>handler</A>
must be a function with three arguments <A>infoclass</A>, <A>level</A>,
<A>list</A>. Here <A>list</A> is the list containing the third to last
argument of the <Ref Func="Info"/> call.
<A>list</A>. Here <A>list</A> is the list containing the third argument and
any subsequent optional arguments of the <Ref Func="Info"/> call.
<P/>
The default handler is the function <C>DefaultInfoHandler</C>.
<Index Key="DefaultInfoHandler"><C>DefaultInfoHandler</C></Index>
Expand Down

0 comments on commit c3701c0

Please sign in to comment.