4d871a85f66b6ba84edcc04b48430e64269e395a
[scilab.git] / scilab / modules / functions / help / ja_JP / deff.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) XXXX-2008 - INRIA
5  * Copyright (C) 2018 - Samuel GOUGEON
6  *
7  * Copyright (C) 2012 - 2016 - Scilab Enterprises
8  *
9  * This file is hereby licensed under the terms of the GNU GPL v2.0,
10  * pursuant to article 5.3.4 of the CeCILL v.2.1.
11  * This file was originally licensed under the terms of the CeCILL v2.1,
12  * and continues to be available under such terms.
13  * For more information, see the COPYING file which you should have received
14  * along with this program.
15  *
16  -->
17 <refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"
18         xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML"
19         xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org"
20         xml:lang="ja" xml:id="deff">
21     <refnamediv>
22         <refname>deff</refname>
23         <refpurpose>関数のオンライン定義</refpurpose>
24     </refnamediv>
25     <refsynopsisdiv>
26         <title>呼び出し手順</title>
27         <synopsis>deff('[s1, s2,...] = newfunction(e1, e2,...)',text)</synopsis>
28     </refsynopsisdiv>
29     <refsection>
30         <title>引数</title>
31         <variablelist>
32             <varlistentry>
33                 <term>e1, e2, ...</term>
34                 <listitem>
35                     <para>入力変数.</para>
36                 </listitem>
37             </varlistentry>
38             <varlistentry>
39                 <term>s1, s2, ...</term>
40                 <listitem>
41                     <para>出力変数.</para>
42                 </listitem>
43             </varlistentry>
44             <varlistentry>
45                 <term>text</term>
46                 <listitem>
47                     <para>文字列行列</para>
48                 </listitem>
49             </varlistentry>
50         </variablelist>
51     </refsection>
52     <refsection>
53         <title>説明</title>
54         <para>
55             <function>deff</function> はテキスト文字列で記述された一連の命令から
56             関数を定義する際に使用されます.
57             得られる関数オブジェクトはテキストファイルで定義され,
58             <function>exec</function> または <function>exec</function> で
59             定義された他の関数と同じ特性を有しています.
60         </para>
61         <warning>>
62             命令の中の引用符(文字列の区切りまたは行列の転置を意味する)は,
63             ただしく解釈されるように二重化する必要があります(<link linkend="quote">quote</link>のヘルプを参照).
64             この仕様のため,作成作業はやや不便となります.
65         </warning>
66     </refsection>
67     <refsection>
68         <title>例</title>
69         <programlisting role="example"><![CDATA[
70 deff('x = myplus(y,z)', 'x = y+z')
71 myplus(1,%i)
72
73 deff('[y, z] = mymacro(x)', ['y = 3*x+1'; 'z = a*x + x.^2'])
74 a = 3;
75 [u, v] = mymacro(2)
76  ]]></programlisting>
77     <screen><![CDATA[
78 --> deff('x = myplus(y,z)', 'x = y+z')
79 --> myplus(1,%i)
80  ans  =
81    1. + i
82
83 --> deff('[y, z] = mymacro(x)', ['y = 3*x+1'; 'z = a*x + x.^2'])
84 --> a = 3;
85 --> [u, v] = mymacro(2)
86  v  =
87    10.
88
89  u  =
90    7.
91 ]]></screen>
92     </refsection>
93     <refsection role="see also">
94         <title>参照</title>
95         <simplelist type="inline">
96             <member>
97                 <link linkend="function">function</link>
98             </member>
99             <member>
100                 <link linkend="exec">exec</link>
101             </member>
102             <member>
103                 <link linkend="getd">getd</link>
104             </member>
105             <member>
106                 <link linkend="genlib">genlib</link>
107             </member>
108             <member>
109                 <link linkend="jdeff">jdeff</link>
110             </member>
111             <member>
112                 <link linkend="jcompile">jcompile</link>
113             </member>
114         </simplelist>
115     </refsection>
116     <refsection role="history">
117         <title>履歴</title>
118         <revhistory>
119             <revision>
120                 <revnumber>6.0.0</revnumber>
121                 <revdescription>
122                    <itemizedlist>
123                      <listitem>
124                        The input option
125                        <ulink url="https://help.scilab.org/docs/5.5.2/ja_JP/deff.html">
126                          <varname>opt="c"|"p"|"n"</varname>
127                        </ulink> is no longer available.
128                      </listitem>
129                      <listitem>
130                         The defined <varname>newfunction</varname> is now of type 13 (instead of 11).
131                      </listitem>
132                   </itemizedlist>
133                 </revdescription>
134             </revision>
135         </revhistory>
136     </refsection>
137 </refentry>