<?xml version="1.0" encoding="UTF-8"?>
<!--
 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
 * Copyright (C) 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:ns4="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="ilib_verbose" xml:lang="en">
    <refnamediv>
        <refname>ilib_verbose</refname>
        <refpurpose>set level of display used by dynamic link
            functions.
        </refpurpose>
    </refnamediv>
    <refsynopsisdiv>
        <title>Syntax</title>
        <synopsis>
            level = ilib_verbose()
            ilib_verbose(level)
        </synopsis>
    </refsynopsisdiv>
    <refsection>
        <title>Arguments</title>
        <variablelist>
            <varlistentry>
                <term>level :</term>
                <listitem>
                    <para>level of verbose for dynamic link functions.</para>
                    <para>0 : no message</para>
                    <para>1 : default level (as previous version of scilab)</para>
                    <para>2 : maximum verbose level (configure , makefile, debug
                        information, ...)
                    </para>
                </listitem>
            </varlistentry>
        </variablelist>
    </refsection>
    <refsection>
        <title>Description</title>
        <para>"ilib_verbose" set level of display used by dynamic link
            functions.
        </para>
        <para>All dynamic functions in dynamic link module check this value and
            display or not some information.
        </para>
    </refsection>
    <refsection>
        <title>Examples</title>
        <programlisting role="example"><![CDATA[
if haveacompiler() then
  cur_verbose = ilib_verbose();
  ilib_verbose(0);

  chdir(TMPDIR);
  f1=['int ext1c(int *n, double *a, double *b, double *c)'
      '{int k;'
      '  for (k = 0; k < *n; ++k) '
      '      c[k] = a[k] + b[k];'
      '  return(0);}'];

  mputl(f1,'fun1.c');

  ilib_for_link('ext1c','fun1.c',[],"c");
  exec loader.sce;

  //using the new primitive
  a=[1,2,3];b=[4,5,6];n=3;
  c = call('ext1c',n,1,'i',a,2,'d',b,3,'d','out',[1,3],4,'d');
  if norm(c-(a+b)) > %eps then pause,end

  ilib_verbose(1);

  f2=['int ext2c(int *n, double *a, double *b, double *c)'
      '{int k;'
      '  for (k = 0; k < *n; ++k) '
      '      c[k] = a[k] + b[k];'
      '  return(0);}'];

  mputl(f2,'fun2.c');

  ilib_for_link('ext2c','fun2.c',[],"c")
  exec loader.sce;

  //using the new primitive
  a = [1,2,3]; b = [4,5,6];n = 3;
  c = call('ext2c',n,1,'i',a,2,'d',b,3,'d','out',[1,3],4,'d');
  if norm(c-(a+b)) > %eps then pause,end

  ilib_verbose(cur_verbose);

end
 ]]></programlisting>
    </refsection>
    <refsection role="see also">
        <title>See also</title>
        <simplelist type="inline">
            <member>
                <link linkend="mode">mode</link>
            </member>
            <member>
                <link linkend="link">link</link>
            </member>
            <member>
                <link linkend="ilib_compile">ilib_compile</link>
            </member>
            <member>
                <link linkend="ilib_gen_Make">ilib_build</link>
            </member>
            <member>
                <link linkend="ilib_for_link">ilib_for_link</link>
            </member>
        </simplelist>
    </refsection>
</refentry>
