<?xml version="1.0" encoding="UTF-8"?>
<!--
 * Scilab ( https://www.scilab.org/ ) - This file is part of Scilab
 * Copyright (C) 2009  - DIGITEO - Sylvestre LEDRU
 *
 * 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:ns5="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="SendScilabJobs" xml:lang="en">
    <refnamediv>
        <refname>SendScilabJobs</refname>
        <refpurpose>Send Scilab tasks from a C/C++ code (call_scilab)</refpurpose>
    </refnamediv>
    <refsynopsisdiv>
        <synopsis>int SendScilabJobs(char **jobs, int numberjobs);</synopsis>
    </refsynopsisdiv>
    <refsection>
        <title>Description</title>
        <para>This fonction is provided in call_scilab. This function send many
            tasks which will be processed by the Scilab engine.
        </para>
        <para>
            <note>
                Note that the ending ";" is not mandatory at the end of a
                command.
            </note>
        </para>
    </refsection>
    <refsection>
        <title>Arguments</title>
        <variablelist>
            <varlistentry>
                <term>jobs</term>
                <listitem>
                    <para>an array of standard C char* containing the Scilab
                        instructions
                    </para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>numberjobs</term>
                <listitem>
                    <para>The number of the Scilab instructions</para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>returns</term>
                <listitem>
                    <para>0 is all the operations are successful.</para>
                    <para>-10 if .</para>
                    <para>&lt;0 and &gt; -10 when an error occurred in the
                        execution.
                    </para>
                </listitem>
            </varlistentry>
        </variablelist>
    </refsection>
    <refsection>
        <title>Examples</title>
        <programlisting role="example"><![CDATA[
// A simple SendScilabJobs example

char* jobs[3];
jobs[0]="a = 1";
jobs[1]="b = 3";
jobs[2]="c = a + b;";
SendScilabJobs(jobs,3);
SendScilabJob("disp(c);"); // Will display   4.
 ]]></programlisting>
    </refsection>
    <refsection role="see also">
        <title>See also</title>
        <simplelist type="inline">
            <member>
                <link linkend="call_scilab">Call_Scilab</link>
            </member>
            <member>
                <link linkend="SendScilabJob">SendScilabJob</link>
            </member>
            <member>
                <link linkend="compile_and_run_call_scilab">Compile and run with call_scilab</link>
            </member>
        </simplelist>
    </refsection>
</refentry>
