* Bug 14900 fixed: function overloading code mc => function 92/20992/7
Samuel GOUGEON [Fri, 31 May 2019 14:57:26 +0000 (16:57 +0200)]
  http://bugzilla.scilab.org/14900

  Apparently, after S.num = %pi;
  modulo == S // does not need %function_o_st(), but when this one is
  defined, the comparison calls it.

Change-Id: I02dd07110ebbcce14042fd5591a136a74d8055c6

12 files changed:
scilab/CHANGES.md
scilab/modules/functions/help/en_US/overloading.xml
scilab/modules/functions/help/ja_JP/overloading.xml
scilab/modules/functions/help/pt_BR/overloading.xml
scilab/modules/functions/help/ru_RU/overloading.xml
scilab/modules/helptools/data/pages/homepage-en_US.html
scilab/modules/overloading/macros/%function_i_h.sci [moved from scilab/modules/overloading/macros/%mc_i_h.sci with 94% similarity]
scilab/modules/overloading/macros/%function_i_s.sci [moved from scilab/modules/overloading/macros/%mc_i_s.sci with 93% similarity]
scilab/modules/overloading/macros/%function_i_st.sci [moved from scilab/modules/overloading/macros/%mc_i_st.sci with 93% similarity]
scilab/modules/overloading/macros/%function_n_st.sci [moved from scilab/modules/overloading/macros/%mc_n_st.sci with 94% similarity]
scilab/modules/overloading/macros/%function_o_st.sci [moved from scilab/modules/overloading/macros/%mc_o_st.sci with 94% similarity]
scilab/modules/xml/sci_gateway/xml_gateway.xml

index 514902a..666571f 100644 (file)
@@ -190,6 +190,7 @@ Feature changes and additions
 * Most of graphic objects can be moved interactively in opened figures.
 * `circshift` is introduced.
 * `atomsGetInstalledPath` is no longer sensitive to the case or completeness of the modules names. Providing the modules versions is now optional.
+* `function` replaces `mc` as the new overloading code for functions in Scilab language.
 
 Help pages:
 -----------
@@ -330,6 +331,7 @@ Bug Fixes
 * [#14812](https://bugzilla.scilab.org/14812): Minor typos in messages.
 * [#14836](https://bugzilla.scilab.org/14836): Calling `exportUI` on a non dockable figure crashed scilab.
 * [#14863](https://bugzilla.scilab.org/14863): In Xcos, the default ending time was unhandily high (100000), reduced it to 30.
+* [#14900](https://bugzilla.scilab.org/14900): In Scilab 6.0, the new overloading code `function` replacing `mc` for functions in Scilab language was not documented.
 * [#14982](https://bugzilla.scilab.org/14982): `msprintf` segmentation fault was caught due to wrong size
 * [#14985](https://bugzilla.scilab.org/14985): Scilab crashed if a .bin file was not found.
 * [#15068](https://bugzilla.scilab.org/15068): `size(sum(ones(2,3,4,5),4))` was [4 2 3] instead of [2 3 4].
index a267111..f789332 100644 (file)
  * 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: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="overloading" xml:lang="en">
+<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="overloading" xml:lang="en">
     <refnamediv>
         <refname>overloading</refname>
         <refpurpose>display, functions and operators overloading
                 <td/>
             </tr>
             <tr>
-                <td>compiled function</td>
+                <td>hard-coded function</td>
                 <td>
                     <literal>fptr</literal>
                 </td>
             <tr>
                 <td>script function</td>
                 <td>
-                    <literal>mc</literal>
+                    <literal>function</literal>
                 </td>
                 <td>
                     <literal>function</literal>
                 ..., in)
             </literal>
             has the following syntax: <literal>b =
-                %&lt;type_of_a&gt;_e_(i1, ..., in, a)
+                %&lt;type_of_a&gt;_e(i1, ..., in, a)
             </literal>
         </para>
         <para>
             and the syntax <literal>[x1, .., xm] = a(i1, ..., in)</literal> has
             the following syntax: <literal>[x1, .., xm] =
-                %&lt;type_of_a&gt;_e_(i1, ..., in, a)
+                %&lt;type_of_a&gt;_e(i1, ..., in, a)
             </literal>
             .
         </para>
             </member>
         </simplelist>
     </refsection>
+    <refsection role="history">
+        <title>History</title>
+        <revhistory>
+            <revision>
+                <revnumber>6.0</revnumber>
+                <revdescription>
+                  <literal>function</literal> replaces <literal>mc</literal> as overloading code
+                  for functions in Scilab language.
+                </revdescription>
+            </revision>
+        </revhistory>
+    </refsection>
 </refentry>
index fc9a2e9..1eaee74 100644 (file)
  * 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: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="overloading" xml:lang="ja">
+<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="overloading" xml:lang="ja">
     <refnamediv>
         <refname>overloading</refname>
         <refpurpose>表示,関数および演算子オーバーロード機能</refpurpose>
             <tr>
                 <td>スクリプト関数</td>
                 <td>
-                    <literal>mc</literal>
+                    <literal>function</literal>
                 </td>
                 <td>
                     <literal>関数</literal>
         <para>
             展開構文<literal>b=a(i1,...,in)</literal>の オーバーロード関数は,
             以下のような呼び出し手順となります:
-            <literal>b=%&lt;type_of_a&gt;_e_(i1,...,in,a)</literal>
+            <literal>b=%&lt;type_of_a&gt;_e(i1,...,in,a)</literal>
         </para>
         <para>
-            そして,構文 <literal>[x1,..,xm]=a(i1,...,in)</literal> は
+            そして,構文 <literal>[x1,..,xm] = a(i1,...,in)</literal> は
             以下のような呼び出し手順となります:
-            <literal>[x1,..,xm]=%&lt;type_of_a&gt;_e_(i1,...,in,a)</literal>
+            <literal>[x1,..,xm] = %&lt;type_of_a&gt;_e(i1,...,in,a)</literal>
         </para>
         <para>
             挿入構文に関するオーバーロード関数 <literal>a(i1,...,in)=b</literal>
             </member>
         </simplelist>
     </refsection>
+    <refsection role="history">
+        <title>履歴</title>
+        <revhistory>
+            <revision>
+                <revnumber>6.0</revnumber>
+                <revdescription>
+                  <literal>function</literal> replaces <literal>mc</literal> as overloading code
+                  for functions in Scilab language.
+                </revdescription>
+            </revision>
+        </revhistory>
+    </refsection>
 </refentry>
index ae25e68..1c81715 100644 (file)
  * 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: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="overloading" xml:lang="pt">
+<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="overloading" xml:lang="pt">
     <refnamediv>
         <refname>overloading</refname>
         <refpurpose>capacidades de overloading ("sobrecarga") de exibições,
             caracteres associadas a cada tipo de dado como descrito na tabela
             seguinte:
         </para>
-        <informaltable border="1">
-            <tr>
-                <td>tipo de dado</td>
-                <td>código "char"</td>
-                <td>tipo de dado</td>
-                <td>código "char"</td>
-            </tr>
-            <tr>
-                <td>constante</td>
-                <td>
-                    <literal>s</literal>
-                </td>
-                <td>booleano</td>
-                <td>
-                    <literal>b</literal>
-                </td>
-            </tr>
-            <tr>
-                <td>string</td>
-                <td>
-                    <literal>c</literal>
-                </td>
-                <td>bibilioteca</td>
-                <td>
-                    <literal>f</literal>
-                </td>
-            </tr>
-            <tr>
-                <td>ponteiro de função</td>
-                <td>
-                    <literal>fptr</literal>
-                </td>
-                <td>manipulador</td>
-                <td>
-                    <literal>h</literal>
-                </td>
-            </tr>
-            <tr>
-                <td>inteiro</td>
-                <td>
-                    <literal>i</literal>
-                </td>
-                <td>lista</td>
-                <td>
-                    <literal>l</literal>
-                </td>
-            </tr>
-            <tr>
-                <td>função</td>
-                <td>
-                    <literal>m</literal>
-                </td>
-                <td>função compilada</td>
-                <td>
-                    <literal>mc</literal>
-                </td>
-            </tr>
-            <tr>
-                <td>polinômio</td>
-                <td>
-                    <literal>p</literal>
-                </td>
-                <td>esparso</td>
-                <td>
-                    <literal>sp</literal>
-                </td>
-            </tr>
-            <tr>
-                <td>esparso booleano</td>
-                <td>
-                    <literal>spb</literal>
-                </td>
-                <td>tlist</td>
-                <td>
-                    <literal>tlist_type</literal>
-                </td>
-            </tr>
-            <tr>
-                <td>lista implícita</td>
-                <td>
-                    <literal>ip</literal>
-                </td>
-                <td>matriz esparsa do Matlab</td>
-                <td>
-                    <literal>msp</literal>
-                </td>
-            </tr>
-            <tr>
-                <td>mlist</td>
-                <td>
-                    <literal>mlist_type</literal>
-                </td>
-                <td>ponteiro</td>
-                <td>
-                    <literal>ptr</literal>
-                </td>
+        <informaltable>
+            <tr>
+            <td>
+            <informaltable border="1">
+                <tr><td>tipo de dado</td>       <td>código "char"</td>          </tr>
+                <tr><td>booleano</td>           <td><literal>b</literal></td>   </tr>
+                <tr><td>esparso booleano</td>   <td><literal>spb</literal></td> </tr>
+                <tr><td>inteiro</td>            <td><literal>i</literal></td>   </tr>
+                <tr><td>número decimal</td>     <td><literal>s</literal></td>   </tr>
+                <tr><td>matriz esparsa</td>     <td><literal>sp</literal></td>  </tr>
+                <tr><td>matriz esparsa do Matlab</td><td><literal>msp</literal></td></tr>
+                <tr><td>polinômio</td>          <td><literal>p</literal></td>   </tr>
+                <tr><td>fração racional</td>    <td><literal>r</literal></td>   </tr>
+                <tr><td>texto</td>              <td><literal>c</literal></td>   </tr>
+                <tr><td>gráfico</td>            <td><literal>h</literal></td>   </tr>
+            </informaltable>
+            </td>
+            <td> </td>
+            <td>
+            <informaltable border="1">
+                <tr><td>tipo de dado</td>       <td>código "char"</td>          </tr>
+                <tr><td><literal>function</literal></td><td><literal>function</literal></td></tr>
+                <tr><td>hard-coded função</td>  <td><literal>fptr</literal></td></tr>
+                <tr><td>biblioteca</td>         <td><literal>f</literal></td>   </tr>
+                <tr><td>lista</td>              <td><literal>l</literal></td>   </tr>
+                <tr><td>tlist</td>              <td><literal>tlist_type</literal></td></tr>
+                <tr><td>mlist</td>              <td><literal>mlist_type</literal></td></tr>
+                <tr><td>lista implícita</td>    <td><literal>ip</literal></td>  </tr>
+                <tr><td>cell</td>               <td><literal>ce</literal></td> </tr>
+                <tr><td>structure</td>          <td><literal>st</literal></td> </tr>
+                <tr><td>linear dynamical system</td><td><literal>lss</literal></td> </tr>
+                <tr><td>ponteiro</td>           <td><literal>ptr</literal></td> </tr>
+                <tr><td>undefined|null object</td><td><literal>0</literal></td> </tr>
+              </informaltable>
+            </td>
             </tr>
         </informaltable>
         <para>
         </informaltable>
         <para>A função de sobrecarga para sintaxe de extração
             <literal>b=a(i1,...,in)</literal> tem a seguinte seqüência de chamamento:
-            <literal>b=%&lt;tipo_de_a&gt;_e_(i1,...,in,a)</literal>
+            <literal>b=%&lt;tipo_de_a&gt;_e(i1,...,in,a)</literal>
         </para>
         <para>
             e a sintaxe<literal>[x1,..,xm]=a(i1,...,in)</literal> tem a seguinte
             seqüência de chamamento:
-            <literal>[x1,..,xm]=%&lt;tipo_de_a&gt;_e_(i1,...,in,a)</literal>
+            <literal>[x1,..,xm]=%&lt;tipo_de_a&gt;_e(i1,...,in,a)</literal>
         </para>
         <para>A função de sobrecarga associada à sintaxe de inserção
             <literal>a(i1,...,in)=b</literal> tem a segunite seqüência de
             </member>
         </simplelist>
     </refsection>
+    <refsection role="history">
+        <title>Histórico</title>
+        <revhistory>
+            <revision>
+                <revnumber>6.0</revnumber>
+                <revdescription>
+                  <literal>function</literal> replaces <literal>mc</literal> as overloading code
+                  for functions in Scilab language.
+                </revdescription>
+            </revision>
+        </revhistory>
+    </refsection>
 </refentry>
index 30db924..549806b 100644 (file)
  * 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: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="overloading" xml:lang="ru">
+<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="overloading" xml:lang="ru">
     <refnamediv>
         <refname>перегрузка</refname>
         <refpurpose>
@@ -24,7 +27,8 @@
     <refsection>
         <title>Описание</title>
         <para>
-            В Scilab'е вывод на экран переменной, функции и операторы могут быть определены для новых объектов с помощью функций (в Scilab-коде или примитивов).
+            В Scilab'е вывод на экран переменной, функции и операторы могут быть определены для
+            новых объектов с помощью функций (в Scilab-коде или примитивов).
         </para>
         <variablelist>
             <varlistentry>
                 <td/>
             </tr>
             <tr>
-                <td>компилированная функция</td>
+                <td>жестко закодированная функция</td>
                 <td>
                     <literal>fptr</literal>
                 </td>
                 <td/>
             </tr>
             <tr>
-                <td>сценарий, функция</td>
-                <td>
-                    <literal>mc</literal>
-                </td>
-                <td>
-                    <literal>function</literal>
-                </td>
+                <td><literal>function</literal></td>
+                <td><literal>function</literal></td>
+                <td><literal>function</literal></td>
                 <td/>
             </tr>
             <tr>
             Функция перегрузки для синтаксиса выделения
             <literal>b= a(i1, ..., in)</literal>
             имеет следующую последовательность вызова:
-            <literal>b = %&lt;тип_a&gt;;_e_(i1, ..., in, a)</literal>
+            <literal>b = %&lt;тип_a&gt;;_e(i1, ..., in, a)</literal>
         </para>
         <para>
             и синтаксис <literal>[x1, .., xm] = a(i1, ..., in)</literal>
             имеет следующую последовательность вызова:
-            <literal>[x1, .., xm] = %&lt;тип_a&gt;;_e_(i1, ..., in, a)</literal>.
+            <literal>[x1, .., xm] = %&lt;тип_a&gt;;_e(i1, ..., in, a)</literal>.
         </para>
         <para>
             Функция перегрузки, связанная с синтаксисом вставки
             </member>
         </simplelist>
     </refsection>
+    <refsection role="history">
+        <title>История</title>
+        <revhistory>
+            <revision>
+                <revnumber>6.0</revnumber>
+                <revdescription>
+                  <literal>function</literal> replaces <literal>mc</literal> as overloading code
+                  for functions in Scilab language.
+                </revdescription>
+            </revision>
+        </revhistory>
+    </refsection>
 </refentry>
index 64bd0d0..2b633a1 100644 (file)
             <li>Most of graphic objects can be moved interactively in opened figures.</li>
             <li><code>circshift</code> is introduced.</li>
             <li><code>atomsGetInstalledPath</code> is no longer sensitive to the case or completeness of the modules names. Providing the modules versions is now optional.</li>
+            <li><code>function</code> replaces <code>mc</code> as the new overloading code for functions in Scilab language.</li>
         </ul>
         <h2 class="title">Help pages</h2>
         <ul>
@@ -10,7 +10,7 @@
 // For more information, see the COPYING file which you should have received
 // along with this program.
 
-function h=%mc_i_h(i,v,h)
+function h = %function_i_h(i,v,h)
     h=generic_i_h(i,v,h)
 endfunction
 
@@ -10,6 +10,6 @@
 // For more information, see the COPYING file which you should have received
 // along with this program.
 
-function M=%mc_i_s(varargin)
+function M = %function_i_s(varargin)
     M=generic_i_s(varargin(:))
 endfunction
@@ -10,6 +10,6 @@
 // For more information, see the COPYING file which you should have received
 // along with this program.
 
-function out=%mc_i_st(i,in,out)
+function out = %function_i_st(i,in,out)
     out=generic_i_st(i,in,out)
 endfunction
@@ -10,7 +10,7 @@
 // For more information, see the COPYING file which you should have received
 // along with this program.
 
-function r=%mc_n_st(a,b)
+function r = %function_n_st(a,b)
     // implements r=a~=b
     // for a a function  and b a struct
     r=%t
@@ -10,7 +10,7 @@
 // For more information, see the COPYING file which you should have received
 // along with this program.
 
-function r=%mc_o_st(a,b)
+function r = %function_o_st(a,b)
     // implements r=a==b
     // for a a function  and b a struct
     r=%f
index 6e0b93a..dac21eb 100644 (file)
@@ -62,7 +62,7 @@
     <gateway name="sci_percent_foo_i_XMLList"       function="%i_i_XMLList"         type="0" />
     <gateway name="sci_percent_foo_i_XMLList"       function="%h_i_XMLList"         type="0" />
     <gateway name="sci_percent_foo_i_XMLList"       function="%fptr_i_XMLList"      type="0" />
-    <gateway name="sci_percent_foo_i_XMLList"       function="%mc_i_XMLList"        type="0" />
+    <gateway name="sci_percent_foo_i_XMLList"       function="%function_i_XMLList"  type="0" />
     <gateway name="sci_percent_foo_i_XMLList"       function="%l_i_XMLList"         type="0" />
     <gateway name="sci_percent_foo_i_XMLList"       function="%hm_i_XMLList"        type="0" />
     <gateway name="sci_percent_foo_i_XMLList"       function="%ptr_i_XMLList"       type="0" />