c684204764ce2e3d7476c5f61e0bffd3f9157e56
[scilab.git] / scilab / modules / core / help / ja_JP / variables / isdef.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
4  * Copyright (C) 2008 - INRIA
5  * 
6  * This file must be used under the terms of the CeCILL.
7  * This source file is licensed as described in the file COPYING, which
8  * you should have received as part of this distribution.  The terms
9  * are also available at    
10  * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
11  *
12  -->
13 <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="isdef" xml:lang="ja">
14     <refnamediv>
15         <refname>isdef</refname>
16         <refpurpose>変数の存在を確認</refpurpose>
17     </refnamediv>
18     <refsynopsisdiv>
19         <title>呼び出し手順</title>
20         <synopsis>isdef(name [,where])</synopsis>
21     </refsynopsisdiv>
22     <refsection>
23         <title>パラメータ</title>
24         <variablelist>
25             <varlistentry>
26                 <term>name</term>
27                 <listitem>
28                     <para>文字列</para>
29                 </listitem>
30             </varlistentry>
31             <varlistentry>
32                 <term>where</term>
33                 <listitem>
34                     <para>オプションのパラメータ文字列,
35                         デフォルト値は <literal>'all'</literal>
36                     </para>
37                 </listitem>
38             </varlistentry>
39         </variablelist>
40     </refsection>
41     <refsection>
42         <title>説明</title>
43         <para>
44             <literal>isdef(name)</literal>は,
45             <literal>name</literal>という名前の変数が存在する場合に
46             <literal>%T</literal>, それ以外の場合に <literal>%F</literal> を返します.
47         </para>
48         <para>
49             注意: <literal>isdef</literal> を使用する関数
50             は環境に依存した結果を返す可能性があります!
51         </para>
52         <para>
53             <literal>isdef(name,'local')</literal> は,
54             <literal>name</literal>という名前の変数がカレントの関数のローカル環境に
55             存在する場合に       <literal>%T</literal>, それ以外の場合に <literal>%F</literal> を返します.
56         </para>
57         <para>
58             <literal>isdef(name,'nolocal')</literal> は,
59             <literal>name</literal>という名前の変数が(グローバルレベルを含む)呼び出した側の環境に
60             存在する場合に       <literal>%T</literal>, 
61             それ以外の場合に <literal>%F</literal> を返します.
62         </para>
63     </refsection>
64     <refsection>
65         <title>例</title>
66         <programlisting role="example"><![CDATA[ 
67 A=1;
68 isdef('A')
69 clear A
70 isdef('A')
71
72 function level1()
73   function level2()
74     disp(isdef("a","all"));
75     disp(isdef("a","local"));
76     disp(isdef("a","nolocal"));
77   endfunction
78   level2()
79 endfunction
80 function go()
81   a=1;
82   level1()
83 endfunction
84 go()
85  ]]></programlisting>
86     </refsection>
87     <refsection role="see also">
88         <title>参照</title>
89         <simplelist type="inline">
90             <member>
91                 <link linkend="exists">exists</link>
92                 <link linkend="isglobal">isglobal</link>
93             </member>
94             <member>
95                 <link linkend="whereis">whereis</link>
96             </member>
97             <member>
98                 <link linkend="type">type</link>
99             </member>
100             <member>
101                 <link linkend="typeof">typeof</link>
102             </member>
103             <member>
104                 <link linkend="clear">clear</link>
105             </member>
106         </simplelist>
107     </refsection>
108 </refentry>