update japanese translation of core module.
[scilab.git] / scilab / modules / core / help / ja_JP / variables / exists.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns3="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="exists" xml:lang="ja">
3     <refnamediv>
4         <refname>exists</refname>
5         <refpurpose>変数の存在を確認する</refpurpose>
6     </refnamediv>
7     <refsynopsisdiv>
8         <title>呼出し手順</title>
9         <synopsis>ve = exists(name [,where])</synopsis>
10     </refsynopsisdiv>
11     <refsection>
12         <title>引数</title>
13         <variablelist>
14             <varlistentry>
15                 <term>ve</term>
16                 <listitem>
17                     <para>
18                         <varname>name</varname>と同じ大きさの行列で,
19                         使用される値は:
20                         <literal>1</literal> (trueの場合), 
21                         <literal>0</literal> (falseの場合)
22                     </para>
23                 </listitem>
24             </varlistentry>
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                         オプションの文字で,以下の値を指定します:
36                         <literal>'l'</literal> (local), <literal>'n'</literal>
37                         (nolocal) および <literal>'a'</literal> (all). 
38                         デフォルト値は<literal>'a'</literal>です.
39                     </para>
40                 </listitem>
41             </varlistentry>
42         </variablelist>
43     </refsection>
44     <refsection>
45         <title>説明</title>
46         <para>
47             <literal>exists(name)</literal> は,
48             <literal>name</literal>という名前の変数が存在する場合に
49             <literal>1</literal>,それ以外の場合に<literal>0</literal>を返します.
50               
51         </para>
52         <para>
53             注意: <literal>exists</literal> を使用する関数は,
54             環境に依存する結果を返す可能性があります!
55         </para>
56         <para>
57             <literal>exists(name,'l')</literal> は,
58             <literal>name</literal>という名前の変数がカレントの関数の
59             環境に存在する場合に <literal>1</literal>,
60             それ以外の場合に <literal>0</literal> を返します.
61         </para>
62         <para>
63             <literal>exists(name,'n')</literal> は,
64             <literal>name</literal>という名前の変数が関数の呼び出し元の
65             環境(Scilabシェルメインレベルを含む)に存在する場合に <literal>1</literal>,
66             それ以外の場合に <literal>0</literal> を返します.
67         </para>
68         <para>
69             警告: <literal>exists</literal>関数は,ある変数が
70             <link linkend="global">グローバル</link>
71             名前空間に存在するかどうかを確認しません.
72         </para>
73     </refsection>
74     <refsection>
75         <title>例</title>
76         <programlisting role="example"><![CDATA[
77 exists("myNotLikelyToExistVar")
78 myNotLikelyToExistVar = 1;
79 exists("myNotLikelyToExistVar")
80  ]]></programlisting>
81         <programlisting role="example"><![CDATA[ 
82 deff('foo(x)',..
83 ['disp([exists(''a12''),exists(''a12'',''l'')])'
84  'disp([exists(''x''),exists(''x'',''l'')])'])
85 foo(1)
86 a12=[];foo(1)
87 function level1()
88   function level2()
89     disp(exists(["a","b"],"a"));
90     disp(exists(["a","b"],"l"));
91     disp(exists(["a","b"],"n"));
92   endfunction
93   level2()
94 endfunction
95 function go()
96   a=1;
97   level1()
98 endfunction
99 go()
100  ]]></programlisting>
101     </refsection>
102     <refsection role="see also">
103         <title>参照</title>
104         <simplelist type="inline">
105             <member>
106                 <link linkend="isdef">isdef</link>
107             </member>
108             <member>
109                 <link linkend="isglobal">isglobal</link>
110             </member>
111             <member>
112                 <link linkend="whereis">whereis</link>
113             </member>
114             <member>
115                 <link linkend="type">type</link>
116             </member>
117             <member>
118                 <link linkend="typeof">typeof</link>
119             </member>
120             <member>
121                 <link linkend="macrovar">macrovar</link>
122             </member>
123         </simplelist>
124     </refsection>
125 </refentry>