<?xml version="1.0" encoding="UTF-8"?>
<!--
 * Scilab ( https://www.scilab.org/ ) - This file is part of Scilab
 * Copyright (C) 2008 - INRIA
 * Copyright (C) 2010 - DIGITEO - Allan CORNET
 *
 * Copyright (C) 2012 - 2016 - Scilab Enterprises
 *
 * This file is hereby licensed under the terms of the GNU GPL v2.0,
 * pursuant to article 5.3.4 of the CeCILL v.2.1.
 * This file was originally licensed under the terms of the CeCILL v2.1,
 * and continues to be available under such terms.
 * For more information, see the COPYING file which you should have received
 * along with this program.
 *
 -->
<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:lang="en" xml:id="percenthelps">
    <refnamediv>
        <refname>%helps</refname>
        <refpurpose>
            global variable: paths to help directories of loaded external modules
        </refpurpose>
    </refnamediv>
    <refsection role="description">
        <title>Description</title>
        <para>
            The global variable <literal>%helps</literal> is an N x 2 matrix of strings.
            Each row refers to the help chapter of a loaded external module:
            <itemizedlist>
               <listitem>
                   <literal>%helps(k,1)</literal> is the absolute pathname to its help directory.
               </listitem>
               <listitem>
                   <literal>%helps(k,2)</literal> is the title of its help chapter.
               </listitem>
            </itemizedlist>
        </para>
        <warning>
          This variable must NOT be modified by hand. <literal>add_help_chapter</literal>
          must be used to add a new help chapter and update <literal>%helps</literal>.
        </warning>
    </refsection>
    <refsection role="examples">
       <title>Examples</title>
        <programlisting role="example"><![CDATA[
global %helps  // This instruction creates a local %helps variable connected to the global one
%helps
if %helps==[]                    // No help chapter is registered for any external module
    if atomsGetInstalled()==[]   // If no external module is installed
        atomsInstall uman;       //  we install the "uman" one (available for all plateforms)
    end
    atomsLoad(atomsGetInstalled()(1));  // We load the first module, included its help pages
    %helps                       // Now the external chapter should be registered
end
      ]]></programlisting>
    </refsection>
    <refsection role="see also">
        <title>See also</title>
        <simplelist type="inline">
            <member>
                <link linkend="add_help_chapter">add_help_chapter</link>
            </member>
            <member>
                <link linkend="help">help</link>
            </member>
        </simplelist>
    </refsection>
</refentry>
