<?xml version="1.0" encoding="UTF-8"?>
<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="intppty">
    <refnamediv>
        <refname>intppty</refname>
        <refpurpose>set interface argument passing properties</refpurpose>
    </refnamediv>
    <refsynopsisdiv>
        <title>Syntax</title>
        <synopsis>funs=intppty()
            intppty(fun)
            intppty(fun, action)
        </synopsis>
    </refsynopsisdiv>
    <refsection>
        <title>Arguments</title>
        <variablelist>
            <varlistentry>
                <term>fun</term>
                <listitem>
                    <para>
                        string, module name (see <link linkend="getmodules">getmodules</link>)
                    </para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>action</term>
                <listitem>
                    <para>
                        string, action to realize, value should be "add" or "remove"
                    </para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>funs</term>
                <listitem>
                    <para>
                        string vector, vector of module names (see <link linkend="getmodules">getmodules</link>)
                    </para>
                </listitem>
            </varlistentry>
        </variablelist>
    </refsection>
    <refsection>
        <title>Description</title>
        <para>
            The interface programs may be written in 2 different ways for the mode
            of function argument passing.
        </para>
        <para>
            In the first and default way, the arguments are passed by value.
            With the following syntax:
        </para>
        <programlisting role="no-scilab-exec"><![CDATA[
foo(A,1+2)
 ]]></programlisting>
        <para>
            the argument associated with <literal>A</literal> will be passed by value (a copy
            of <literal>A</literal> is made before <literal>foo</literal> is called), and
            the argument associated with <literal>1+2</literal> will be passed by value.
        </para>
        <para>
            In the second way arguments may be passed be reference if there are "named arguments"
            (no copy of the variable value is done). With the following syntax:
        </para>
        <programlisting role="no-scilab-exec"><![CDATA[
foo(A,1+2)
 ]]></programlisting>
        <para>
            the argument associated with <literal>A</literal> will be passed by reference, and
            the argument associated with <literal>1+2</literal> will be passed by value.
        </para>
        <para>
            <warning>
                Warning: declaring that the interface with number
                <literal>fun</literal> can handle arguments passed by reference if it is not the
                case should produce unpredictable results.
            </warning>
        </para>
        <para>
            <literal>intppty(fun, "remove")</literal> suppress this property
            for the interface <literal>fun</literal>.
        </para>
        <para>
            <literal>intppty()</literal> returns the vector of interfaces which handle
            arguments passed by reference.
        </para>
        <para>
            This function may be useful for dynamically loaded interface (see <link linkend="addinter">addinter</link>).
        </para>
    </refsection>
    <refsection role="see also">
        <title>See also</title>
        <simplelist type="inline">
            <member>
                <link linkend="getmodules">getmodules</link>
            </member>
            <member>
                <link linkend="addinter">addinter</link>
            </member>
        </simplelist>
    </refsection>
</refentry>
