Skip to content

Commit

Permalink
Slightly improve documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisJefferson committed May 27, 2020
1 parent 589af63 commit 55d72c8
Showing 1 changed file with 18 additions and 12 deletions.
30 changes: 18 additions & 12 deletions doc/ref/mloop.xml
Original file line number Diff line number Diff line change
Expand Up @@ -986,24 +986,30 @@ or <C>brk></C> or <C>brk_<A>nn</A>></C> prompt.
</ManSection>

<ManSection>
<Func Name="GapExitCode" Arg='ret'/>
<Func Name="GapExitCode" Arg='[ret]'/>

<Description>
A <C>GapExitCode</C> sets the return value which will be used when
&GAP; exits. This may be an integer, or a boolean (where
<K>true</K> is interpreted as 0, and
<K>false</K> is interpreted as 1.
<P/>
<Ref Func="GapExitCode"/> sets the exit value which is returned
to the operating system (or parent process) when &GAP; exits.
This may be an integer in the range [-128..127] (other values
are reduced modulo 256), or a boolean. <K>true</K> corresponds
to the return value 0, which by convention is treated as "success".
<K>false</K> corresponds to the return value 1, which by convention
is treated as "failure". The exit value is not changed if no argument
is given.
<P/>
The <E>previous</E> exit code is returned.
</Description>
</ManSection>

<ManSection>
<Func Name="QuitGap" Arg='[ret]'/>

<Description>
A <C>QuitGap</C> acts similarly to the keyword <C>quit</C>. It exits
<Ref Func="QuitGap"/> acts similarly to the keyword <C>QUIT</C>, except
<C>QUIT</C> can not be called from a function. It exits
&GAP; cleanly, calling any function installed using <C>InstallAtExit</C>.
The optional argument will be passed to <C>GapExitCode</C>.
The optional argument <A>ret</A> will be passed to <Ref Func="GapExitCode"/>.
<P/>
</Description>
</ManSection>
Expand All @@ -1012,10 +1018,11 @@ The optional argument will be passed to <C>GapExitCode</C>.
<Func Name="ForceQuitGap" Arg='[ret]'/>

<Description>
A <C>ForceQuitGap</C> is similar to <C>QuitGap</C>, except it ignores any
<Ref Func="ForceQuitGap"/> is similar to <Ref Func="QuitGap"/>, except it ignores any
functions installed with <C>InstallAtExit</C>, or any other functions
normally run at GAP exit, and exits GAP immediately.
The optional argument will be passed to <C>GapExitCode</C>.
normally run at GAP exit, such as flushing any partially outputted lines
to both the screen and files, and exits GAP immediately.
The optional argument <A>ret</A> will be passed to <Ref Func="GapExitCode"/>.
<P/>
</Description>
</ManSection>
Expand Down Expand Up @@ -1434,4 +1441,3 @@ interpret.
<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
<!-- %% -->
<!-- %E -->

0 comments on commit 55d72c8

Please sign in to comment.