<?xml version="1.0" encoding="UTF-8"?>
<!--
 * Scilab ( https://www.scilab.org/ ) - This file is part of Scilab
 * Copyright (C) 2009 - DIGITEO - Pierre MARECHAL <pierre.marechal@scilab.org>
 *
 * 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:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:lang="ja" xml:id="isfield">
    <refnamediv>
        <refname>isfield</refname>
        <refpurpose>指定したフィールド名が構造体またはmlistまたはtlistの中にあるかどうか調べる</refpurpose>
    </refnamediv>
    <refsynopsisdiv>
        <title>呼び出し手順</title>
        <synopsis>bool = isfield(s,fieldname)</synopsis>
    </refsynopsisdiv>
    <refsection>
        <title>引数</title>
        <variablelist>
            <varlistentry>
                <term>s</term>
                <listitem>
                    <para>構造体配列, tlist または mlist</para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>fieldname</term>
                <listitem>
                    <para>文字列の行列: 検出するフィールド名</para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>bool</term>
                <listitem>
                    <para>
                        論理値の行列 (<varname>fieldname></varname>と同じ形式).
                    </para>
                </listitem>
            </varlistentry>
        </variablelist>
    </refsection>
    <refsection>
        <title>説明</title>
        <para>
            This function returns <constant>%t</constant> if the specified structure or tlist or mlist <varname>s</varname> includes the field <varname>fieldname</varname>, regardless of the corresponding value. For a structure, the hidden field <code class="literal">dims</code> is ignored.
            この関数は指定した構造体 "s" がその値によらず,
            フィールド "field" を有する場合に true を返します.
        </para>
    </refsection>
    <refsection>
        <title>例</title>
        <programlisting role="example"><![CDATA[
s = struct("field_1",123,"field_2",456,"field_4",789)
// Single Fieldname Syntax
isfield( s , "field_1"  )
// Multiple Fieldname Syntax
isfield( s , [ "field_1" "field_2" ; "field_3" "field_4" ] )
// with a tlist:
s = tlist(["test" "t" "n","","p"], "Hello", %pi, "anonymous", (1-%z)^3)
isfield(s, ["b" "t" ""])  // =>  F  T  T  (anonymous fields can be detected)
 ]]></programlisting>
    </refsection>
    <refsection role="see also">
        <title>参照</title>
        <simplelist type="inline">
            <member>
                <link linkend="struct">struct</link>
            </member>
            <member>
                <link linkend="tlist">tlist</link>
            </member>
            <member>
                <link linkend="mlist">mlist</link>
            </member>
            <member>
                <link linkend="getfield">getfield</link>
            </member>
            <member>
                <link linkend="definedfields">definedfields</link>
            </member>
        </simplelist>
    </refsection>
    <refsection>
        <title>履歴</title>
        <revhistory>
            <revision>
                <revnumber>5.5</revnumber>
                <revremark>
                    mlistおよびtlist用の拡張モジュール
                </revremark>
            </revision>
        </revhistory>
    </refsection>
</refentry>
