<?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="typename">
    <refnamediv>
        <refname>typename</refname>
        <refpurpose>associates a name to variable type</refpurpose>
    </refnamediv>
    <refsynopsisdiv>
        <title>Syntax</title>
        <synopsis>[types [ [,names]]=typename()
        </synopsis>
    </refsynopsisdiv>
    <refsection>
        <title>Arguments</title>
        <variablelist>
            <varlistentry>
                <term>types</term>
                <listitem>
                    <para>an integer column vector: the types codes of each defined data types.</para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>names</term>
                <listitem>
                    <para>a column vector of strings: the names associated to type codes.</para>
                </listitem>
            </varlistentry>
        </variablelist>
    </refsection>
    <refsection>
        <title>Description</title>
        <para>
            The function and operator overloading make use of a formal name
            associated to data types to form the name of the overloading function
            (see <link linkend="overloading">overloading</link>). The <function>typename</function> can be used to handle this
            formal names for hard coded data types (the <literal>tlist</literal> or <literal>mlist</literal>
            coded data types formal names are defined in another way, see <link linkend="overloading">overloading</link>).
        </para>
        <para>
            <function>typename</function> returns information on defined data types.
        </para>
    </refsection>
    <refsection>
        <title>Examples</title>
        <programlisting role="example"><![CDATA[
[typs,nams]=typename();
disp("First type (double) : " + string(typs(1)) + " / " + nams(1));
]]></programlisting>
    </refsection>

    <refsection role="see also">
        <title>See also</title>
        <simplelist type="inline">
            <member>
                <link linkend="type">type</link>
            </member>
            <member>
                <link linkend="typeof">typeof</link>
            </member>
            <member>
                <link linkend="overloading">overloading</link>
            </member>
            <member>
                <link linkend="tlist">tlist</link>
            </member>
            <member>
                <link linkend="mlist">mlist</link>
            </member>
        </simplelist>
    </refsection>
</refentry>
