<?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>[indices, onames] = typename()
        </synopsis>
    </refsynopsisdiv>
    <refsection>
        <title>Arguments</title>
        <variablelist>
            <varlistentry>
                <term>indices</term>
                <listitem>
                    <para>an integer column vector: the types codes of each defined data types.</para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>onames</term>
                <listitem>
                    <para>a column vector of strings: overloading codes associated to types.</para>
                </listitem>
            </varlistentry>
        </variablelist>
    </refsection>
    <refsection>
        <title>Description</title>
        <para>
            <function>typename</function> returns information on defined data types.
        </para>
        <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>
    </refsection>
    <refsection>
        <title>Examples</title>
        <programlisting role="example"><![CDATA[
[ind, onames] = typename();
mprintf("Type index: %3d  overloading code: ""%s""\n", ind, onames)
    ]]></programlisting>
       <screen><![CDATA[
--> mprintf("Type index: %3d  overloading code: ""%s""\n", ind, onames)
Type index:   1  overloading code: "s"
Type index:   2  overloading code: "p"
Type index:   4  overloading code: "b"
Type index:   5  overloading code: "sp"
Type index:   6  overloading code: "spb"
Type index:   8  overloading code: "i"
Type index:   9  overloading code: "h"
Type index:  10  overloading code: "c"
Type index:  13  overloading code: "function"
Type index:  14  overloading code: "f"
Type index:  15  overloading code: "l"
Type index:  16  overloading code: "tl"
Type index:  17  overloading code: "ml"
Type index: 128  overloading code: "ptr"
Type index: 129  overloading code: "ip"
Type index: 130  overloading code: "fptr"
]]></screen>
    </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>
