* Bug 15309 fixed: eval() actual removal 97/19797/4
Samuel GOUGEON [Sat, 24 Feb 2018 17:48:03 +0000 (18:48 +0100)]
  http://bugzilla.scilab.org/15309

  Code already cleaned in https://codereview.scilab.org/19515

Change-Id: Ifa2849a4ed217c879bf316d68c5338936b2d4895

scilab/CHANGES.md
scilab/modules/helptools/data/configuration/scilab_macros.txt
scilab/modules/slint/src/cpp/DeprecatedChecker.cpp
scilab/modules/string/help/en_US/eval.xml [deleted file]
scilab/modules/string/help/fr_FR/eval.xml [deleted file]
scilab/modules/string/help/ja_JP/eval.xml [deleted file]
scilab/modules/string/help/pt_BR/eval.xml [deleted file]
scilab/modules/string/help/ru_RU/eval.xml [deleted file]
scilab/modules/string/macros/eval.sci [deleted file]
scilab/modules/string/tests/nonreg_tests/bug_7282.tst [deleted file]

index 2ed67c9..c87346b 100644 (file)
@@ -177,7 +177,11 @@ Obsolete functions or features
 Removed Functions
 -----------------
 
+<<<<<<< HEAD
 * `getPreferencesValue` was obsolete and has been removed. Please use `xmlGetValues` instead.
+=======
+* `eval` was obsolete and has been removed. Please use `evstr` instead.
+>>>>>>> 1ec71c6c514... * Bug 15309 fixed: eval() actual removal
 * `hypermat` was obsolete and has been removed. Please use `matrix` instead.
 * `square` was obsolete and has been removed.
 * `xgetech` was obsolete and has been removed. Please use `gca` instead.
@@ -227,6 +231,7 @@ Bug Fixes
 * [#15248](http://bugzilla.scilab.org/show_bug.cgi?id=15248): `lsq()`was leaking memory.
 * [#15269](http://bugzilla.scilab.org/show_bug.cgi?id=15269): `xgetech` was poor and stiff compared to any combination of `gca()` properties `.axes_bounds`, `.data_bounds`, `.log_flags`, and `.margins`. It is removed.
 * [#15271](http://bugzilla.scilab.org/show_bug.cgi?id=15271): `bitget` needed to be upgraded.
+* [#15309](http://bugzilla.scilab.org/show_bug.cgi?id=15309): `eval()` was a weak duplicate of `evstr()`. It should be removed.
 * [#15321](http://bugzilla.scilab.org/show_bug.cgi?id=15321): `lu()` was leaking memory.
 * [#15350](http://bugzilla.scilab.org/show_bug.cgi?id=15350): `ric_desc()` should be merged into `riccati()`.
 * [#15368](http://bugzilla.scilab.org/show_bug.cgi?id=15368): `freson()` silently returned frequencies not corresponding to a maximum, or returned [] instead of some still computable maxima frequencies.
index aa2d589..e233651 100644 (file)
@@ -1,10 +1,9 @@
 /*
  *  Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
  *  Copyright (C) 2015 - Scilab Enterprises - Calixte DENIZET
+ *  Copyright (C) 2012 - 2016 - Scilab Enterprises
  *  Copyright (C) 2017, 2018 - Samuel GOUGEON
  *
- * 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,
@@ -105,6 +104,7 @@ std::unordered_map<std::wstring, std::wstring> DeprecatedChecker::initDep()
     map.emplace(L"datatipToggle", L"datatipManagerMode");
     map.emplace(L"denom", L".den");
     map.emplace(L"frexp", L"log2");
+    map.emplace(L"eval", L"evstr");
     map.emplace(L"getPreferencesValue", L"xmlGetValues");
     map.emplace(L"hypermat", L"zeros|matrix");
     map.emplace(L"lstsize", L"size");
diff --git a/scilab/modules/string/help/en_US/eval.xml b/scilab/modules/string/help/en_US/eval.xml
deleted file mode 100644 (file)
index bc82657..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
- * Copyright (C) 2008 - INRIA
- *
- * 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: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="eval" xml:lang="en">
-    <refnamediv>
-        <refname>eval</refname>
-        <refpurpose>
-          evaluation of a matrix of strings  <emphasis role="bold">(obsolete)</emphasis>
-      </refpurpose>
-    </refnamediv>
-    <refsynopsisdiv>
-        <title>Syntax</title>
-        <synopsis>[H] = eval(Z)</synopsis>
-    </refsynopsisdiv>
-    <refsection>
-        <title>Arguments</title>
-        <variablelist>
-            <varlistentry>
-                <term>Z</term>
-                <listitem>
-                    <para>a matrix of character string.</para>
-                </listitem>
-            </varlistentry>
-        </variablelist>
-    </refsection>
-    <refsection>
-        <title>Description</title>
-        <para>
-            The <function>eval</function> function returns the evaluation of the matrix of character strings
-            <varname>Z</varname>.
-        </para>
-    </refsection>
-    <refsection>
-        <title>Examples</title>
-        <programlisting role="example"><![CDATA[
-a=1;
-b=2;
-Z=['a','sin(b)'];
-eval(Z)  //returns the matrix [1, 0.909];
- ]]></programlisting>
-    </refsection>
-    <refsection role="see also">
-        <title>See also</title>
-        <simplelist type="inline">
-            <member>
-                <link linkend="evstr">evstr</link>
-            </member>
-            <member>
-                <link linkend="execstr">execstr</link>
-            </member>
-        </simplelist>
-    </refsection>
-    <refsection role="history">
-        <title>History</title>
-        <revhistory>
-            <revision>
-                <revnumber>6.0.1</revnumber>
-                <revdescription>
-                  <literal>eval()</literal> is declared obsolete, to be removed from Scilab 6.1.0.
-                  Please use <literal>evstr()</literal> instead.
-                </revdescription>
-            </revision>
-        </revhistory>
-    </refsection>
-</refentry>
diff --git a/scilab/modules/string/help/fr_FR/eval.xml b/scilab/modules/string/help/fr_FR/eval.xml
deleted file mode 100644 (file)
index 53e0f96..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<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="eval" xml:lang="fr">
-    <refnamediv>
-        <refname>eval</refname>
-        <refpurpose>
-          évaluation d'une matrice de chaînes de caractères  <emphasis role="bold">(obsolète)</emphasis>
-        </refpurpose>
-    </refnamediv>
-    <refsynopsisdiv>
-        <title>Séquence d'appel</title>
-        <synopsis>[H]= eval(Z)</synopsis>
-    </refsynopsisdiv>
-    <refsection>
-        <title>Description</title>
-        <para>renvoie le résultat de l'évaluation d'une matrice de chaînes de
-            caractères <literal>Z</literal>.
-        </para>
-    </refsection>
-    <refsection>
-        <title>Exemples</title>
-        <programlisting role="example"><![CDATA[
-a=1;
-b=2;
-Z=['a','sin(b)'];
-eval(Z)  // renvoie la matrice [1,0.909];
- ]]></programlisting>
-    </refsection>
-    <refsection role="see also">
-        <title>Voir aussi</title>
-        <simplelist type="inline">
-            <member>
-                <link linkend="evstr">evstr</link>
-            </member>
-            <member>
-                <link linkend="execstr">execstr</link>
-            </member>
-        </simplelist>
-    </refsection>
-    <refsection role="history">
-        <title>Historique</title>
-        <revhistory>
-            <revision>
-                <revnumber>6.0.1</revnumber>
-                <revdescription>
-                  <literal>eval()</literal> est déclarée obsolète, pour un retrait de Scilab 6.1.0.
-                  SVP la remplacer par <literal>evstr()</literal>.
-                </revdescription>
-            </revision>
-        </revhistory>
-    </refsection>
-</refentry>
diff --git a/scilab/modules/string/help/ja_JP/eval.xml b/scilab/modules/string/help/ja_JP/eval.xml
deleted file mode 100644 (file)
index 2f8fc4a..0000000
+++ /dev/null
@@ -1,124 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
- * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
- * Copyright (C) 2008 - INRIA
- *
- * 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: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="eval" xml:lang="ja">
-
-    <refnamediv>
-
-        <refname>eval</refname>
-
-        <refpurpose>文字列の行列を評価する  <emphasis role="bold">(obsolete)</emphasis>
-        </refpurpose>
-
-    </refnamediv>
-
-    <refsynopsisdiv>
-
-        <title>呼び出し手順</title>
-
-        <synopsis>[H] = eval(Z)</synopsis>
-
-    </refsynopsisdiv>
-
-    <refsection>
-
-        <title>引数</title>
-
-        <variablelist>
-
-            <varlistentry>
-
-                <term>Z</term>
-
-                <listitem>
-
-                    <para>文字列の行列.</para>
-
-                </listitem>
-
-            </varlistentry>
-
-        </variablelist>
-
-    </refsection>
-
-    <refsection>
-
-        <title>説明</title>
-
-        <para>
-
-            <function>eval</function>関数は,
-
-            文字列の行列<varname>Z</varname>を評価したものを返します.
-
-        </para>
-
-    </refsection>
-
-    <refsection>
-
-        <title>例</title>
-
-        <programlisting role="example"><![CDATA[
-a=1;
-b=2;
-Z=['a','sin(b)'];
-eval(Z)  //行列 [1, 0.909]を返します;
- ]]></programlisting>
-
-    </refsection>
-
-    <refsection>
-
-        <title>S参照</title>
-
-        <simplelist type="inline">
-
-            <member>
-
-                <link linkend="evstr">evstr</link>
-
-            </member>
-
-            <member>
-
-                <link linkend="execstr">execstr</link>
-
-            </member>
-
-        </simplelist>
-
-    </refsection>
-    <refsection role="history">
-        <title>履歴</title>
-        <revhistory>
-            <revision>
-                <revnumber>6.0.1</revnumber>
-                <revdescription>
-                  <literal>eval()</literal> is declared obsolete, to be removed from Scilab 6.1.0.
-                  Please use <literal>evstr()</literal> instead.
-                </revdescription>
-            </revision>
-        </revhistory>
-    </refsection>
-
-</refentry>
-
diff --git a/scilab/modules/string/help/pt_BR/eval.xml b/scilab/modules/string/help/pt_BR/eval.xml
deleted file mode 100644 (file)
index 0b20412..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
- * Copyright (C) 2008 - INRIA
- *
- * 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:ns4="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="eval" xml:lang="pt">
-    <refnamediv>
-        <refname>eval</refname>
-        <refpurpose>avaliação de uma matriz de strings  <emphasis role="bold">(obsolete)</emphasis>
-      </refpurpose>
-    </refnamediv>
-    <refsynopsisdiv>
-        <title>Seqüência de Chamamento</title>
-        <synopsis>[H]= eval(Z)</synopsis>
-    </refsynopsisdiv>
-    <refsection>
-        <title>Descrição</title>
-        <para>Retorna a avaliação da matriz de strings
-            <literal>Z</literal>.
-        </para>
-    </refsection>
-    <refsection>
-        <title>Exemplos</title>
-        <programlisting role="example"><![CDATA[
-a=1; b=2; Z=['a','sin(b)'] ; eval(Z)  //retorna a matriz [1,0.909];
- ]]></programlisting>
-    </refsection>
-    <refsection role="see also">
-        <title>Ver Também</title>
-        <simplelist type="inline">
-            <member>
-                <link linkend="evstr">evstr</link>
-            </member>
-            <member>
-                <link linkend="execstr">execstr</link>
-            </member>
-        </simplelist>
-    </refsection>
-    <refsection role="history">
-        <title>Histórico</title>
-        <revhistory>
-            <revision>
-                <revnumber>6.0.1</revnumber>
-                <revdescription>
-                  <literal>eval()</literal> is declared obsolete, to be removed from Scilab 6.1.0.
-                  Please use <literal>evstr()</literal> instead.
-                </revdescription>
-            </revision>
-        </revhistory>
-    </refsection>
-</refentry>
diff --git a/scilab/modules/string/help/ru_RU/eval.xml b/scilab/modules/string/help/ru_RU/eval.xml
deleted file mode 100644 (file)
index 5295bae..0000000
+++ /dev/null
@@ -1,79 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
- * Copyright (C) 2008 - INRIA
- *
- * 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: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="eval" xml:lang="ru">
-    <refnamediv>
-        <refname>eval</refname>
-        <refpurpose>
-          вычисление матрицы строк  <emphasis role="bold">(устарело)</emphasis>
-        </refpurpose>
-    </refnamediv>
-    <refsynopsisdiv>
-        <title>Синтаксис</title>
-        <synopsis>[H] = eval(Z)</synopsis>
-    </refsynopsisdiv>
-    <refsection>
-        <title>Аргументы</title>
-        <variablelist>
-            <varlistentry>
-                <term>Z</term>
-                <listitem>
-                    <para>матрица символьных строк.</para>
-                </listitem>
-            </varlistentry>
-        </variablelist>
-    </refsection>
-    <refsection>
-        <title>Описание</title>
-        <para>
-            Функция <function>eval</function> возвращает вычисление матрицы символьных строк <varname>Z</varname>.
-        </para>
-    </refsection>
-    <refsection>
-        <title>Примеры</title>
-        <programlisting role="example"><![CDATA[
-a=1;
-b=2;
-Z=['a','sin(b)'];
-eval(Z)  //возвращает матрицу [1, 0.909];
- ]]></programlisting>
-    </refsection>
-    <refsection role="see also">
-        <title>Смотрите также</title>
-        <simplelist type="inline">
-            <member>
-                <link linkend="evstr">evstr</link>
-            </member>
-            <member>
-                <link linkend="execstr">execstr</link>
-            </member>
-        </simplelist>
-    </refsection>
-    <refsection role="history">
-        <title>История</title>
-        <revhistory>
-            <revision>
-                <revnumber>6.0.1</revnumber>
-                <revdescription>
-                  <literal>eval()</literal> объявлена устаревшей, будет удалена из Scilab 6.1.0.
-                  Пожалуйста, вместо неё используйте <literal>evstr()</literal>.
-                </revdescription>
-            </revision>
-        </revhistory>
-    </refsection>
-</refentry>
diff --git a/scilab/modules/string/macros/eval.sci b/scilab/modules/string/macros/eval.sci
deleted file mode 100644 (file)
index f4914d7..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
-// Copyright (C) INRIA -
-// Copyright (C) DIGITEO - 2010 - Allan CORNET
-// Copyright (C) 2016 - Samuel GOUGEON
-//
-// 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.
-
-
-function _h = eval(z)
-    // Syntax :  H = eval(Z)
-    // returns the evaluation of the matrix of character strings Z.
-    // Example: a=1; b=2; Z=['a','b'] ; eval(Z) returns the matrix [1,2];
-
-    warnobsolete("evstr()", "6.1");
-
-    [nL,nC] = size(z);
-    if nL * nC > 1 then
-        L = (1:nL)'*ones(1,nC)
-        C = ones(nL,1)*(1:nC)
-        //str = "_h("+string(L)+","+string(C)+")="+z    // format()-dependent
-        str = msprintf("_h(%d,%d)=%s\n",L(:),C(:),z(:)) // format()-independent
-    elseif z~=[]
-        str = "_h = " + z;
-    else
-        _h = []
-        return
-    end
-    deff("_h = %eval();", str)
-    _h = %eval()
-
-endfunction
diff --git a/scilab/modules/string/tests/nonreg_tests/bug_7282.tst b/scilab/modules/string/tests/nonreg_tests/bug_7282.tst
deleted file mode 100644 (file)
index 92491e8..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-// =============================================================================
-// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
-// Copyright (C) 2010 - DIGITEO - Allan CORNET
-//
-//  This file is distributed under the same license as the Scilab package.
-// =============================================================================
-
-// <-- CLI SHELL MODE -->
-// <-- NO CHECK REF -->
-// <-- Non-regression test for bug 7282 -->
-//
-// <-- Bugzilla URL -->
-// http://bugzilla.scilab.org/show_bug.cgi?id=7282
-//
-// <-- Short Description -->
-// eval failed on some functions without output arguments.
-errmsg = msprintf(gettext("%s: Wrong number of output argument(s): %d expected.\n"), "realtimeinit", 0);
-str = "realtimeinit(60)";
-assert_checkerror("eval(str)", errmsg);
-
-function o = blabla()
-    o = 3;
-endfunction
-
-r = eval("blabla()");
-if r <> 3 then pause, end
-
-