* Bug 7657: lstsize() is set obsolete, replaced with size() 08/19508/4
Samuel GOUGEON [Tue, 24 Oct 2017 20:25:25 +0000 (22:25 +0200)]
  http://bugzilla.scilab.org/7657

Change-Id: Ib918e824d81e25375bd9a3ee101c93e6c18f72a2

73 files changed:
scilab/CHANGES.md
scilab/modules/compatibility_functions/macros/makecell.sci
scilab/modules/compatibility_functions/macros/mtlb_axis.sci
scilab/modules/compatibility_functions/macros/mtlb_colordef.sci
scilab/modules/compatibility_functions/macros/mtlb_plot.sci
scilab/modules/data_structures/help/en_US/lstsize.xml
scilab/modules/data_structures/help/fr_FR/lstsize.xml
scilab/modules/data_structures/help/ja_JP/lstsize.xml
scilab/modules/data_structures/help/pt_BR/lstsize.xml
scilab/modules/data_structures/help/ru_RU/lstsize.xml
scilab/modules/data_structures/includes/gw_data_structures1.h
scilab/modules/data_structures/macros/lstsize.sci
scilab/modules/data_structures/sci_gateway/data_structures_gateway.xml
scilab/modules/development_tools/macros/testexamples.sce
scilab/modules/functions/macros/expression2code.sci
scilab/modules/graphics/macros/%h_e.sci
scilab/modules/graphics/macros/%h_get.sci
scilab/modules/graphics/macros/%h_set.sci
scilab/modules/helptools/data/configuration/scilab_primitives.txt
scilab/modules/m2sci/macros/kernel/clause2sci.sci
scilab/modules/m2sci/macros/kernel/default_trad.sci
scilab/modules/m2sci/macros/kernel/expression2sci.sci
scilab/modules/m2sci/macros/kernel/infer2txt.sci
scilab/modules/m2sci/macros/kernel/m2sci.sci
scilab/modules/m2sci/macros/kernel/sci_m2scideclare.sci
scilab/modules/m2sci/macros/kernel/update_instr_list.sci
scilab/modules/m2sci/macros/kernel/updatevarslist.sci
scilab/modules/m2sci/macros/percent/%cc_cell2sci.sci
scilab/modules/m2sci/macros/percent/%e2sci.sci
scilab/modules/m2sci/macros/percent/%e_ce2sci.sci
scilab/modules/m2sci/macros/percent/%e_st2sci.sci
scilab/modules/m2sci/macros/percent/%i2sci.sci
scilab/modules/m2sci/macros/percent/%i_ce2sci.sci
scilab/modules/m2sci/macros/percent/%i_st2sci.sci
scilab/modules/m2sci/macros/percent/get_contents_infer.sci
scilab/modules/m2sci/macros/sci_files/sci_hankel.sci
scilab/modules/m2sci/macros/sci_files/sci_horzcat.sci
scilab/modules/m2sci/macros/sci_files/sci_makecell.sci
scilab/modules/m2sci/macros/sci_files/sci_repmat.sci
scilab/modules/m2sci/macros/sci_files/sci_struct.sci
scilab/modules/m2sci/macros/sci_files/sci_vertcat.sci
scilab/modules/matio/macros/loadmatfile.sci
scilab/modules/matio/macros/savematfile.sci
scilab/modules/overloading/macros/%3d_i_h.sci
scilab/modules/overloading/macros/%champdat_i_h.sci
scilab/modules/overloading/macros/%grayplot_i_h.sci
scilab/modules/overloading/macros/%l_n_l.sci
scilab/modules/overloading/macros/%s_i_st.sci
scilab/modules/overloading/macros/%ticks_i_h.sci
scilab/modules/overloading/macros/createstruct.sci
scilab/modules/overloading/macros/generic_i_h.sci
scilab/modules/scicos/macros/scicos_scicos/build_modelica_block.sci
scilab/modules/scicos/macros/scicos_scicos/c_pass2.sci
scilab/modules/scicos/macros/scicos_scicos/c_pass3.sci
scilab/modules/scicos/macros/scicos_scicos/cos2cosf.sci
scilab/modules/scicos/macros/scicos_scicos/create_modelica.sci
scilab/modules/scicos/macros/scicos_scicos/delete_unconnected.sci
scilab/modules/scicos/macros/scicos_scicos/do_compile.sci
scilab/modules/scicos/macros/scicos_scicos/do_compile_superblock42.sci
scilab/modules/scicos/macros/scicos_scicos/do_eval.sci
scilab/modules/scicos/macros/scicos_scicos/do_purge.sci
scilab/modules/scicos/macros/scicos_scicos/do_version.sci
scilab/modules/scicos/macros/scicos_scicos/modipar.sci
scilab/modules/scicos/macros/scicos_scicos/sample_clk.sci
scilab/modules/scicos/macros/scicos_scicos/scicos_flat.sci
scilab/modules/scicos/macros/scicos_scicos/set_io.sci
scilab/modules/scicos/macros/scicos_scicos/update_scs_m.sci
scilab/modules/scicos/tests/unit_tests/model/Delete_objects.dia.ref
scilab/modules/scicos/tests/unit_tests/model/Delete_objects.tst
scilab/modules/scicos_blocks/macros/Misc/MBLOCK.sci
scilab/modules/scicos_blocks/macros/Misc/MPBLOCK.sci
scilab/modules/slint/src/cpp/DeprecatedChecker.cpp
scilab/modules/xcos/macros/xcos_simulate.sci

index c79f153..4e02a35 100644 (file)
@@ -322,6 +322,7 @@ Obsolete functions or features
 * `nanmin` is obsolete and will be removed in Scilab 6.1. Please use `min` instead.
 * `nanmax` is obsolete and will be removed in Scilab 6.1. Please use `max` instead.
 * `xgetech` is obsolete and will be removed in Scilab 6.1. Please use `gca` instead.
+* `lstsize` is obsolete and will be removed in Scilab 6.1. Please use `size` instead.
 
 
 Removed Functions
index a441092..c30248f 100644 (file)
 function s=makecell(varargin)
     // Equivalent for Matlab {}
 
-    if lstsize(varargin)==0 then
+    if size(varargin)==0 then
         dims=[0 0]
         s=mlist(["ce","dims","entries"],int32(dims),list())
         return
     end
 
     dims=varargin(1)
-    if prod(dims)<>lstsize(varargin)-1 then
+    if prod(dims) <> size(varargin)-1 then
         error(msprintf(gettext("%s: Wrong input arguments: Dimensions given as first argument do not match specified cell contents.\n"),"makecell"));
     end
 
index 0302ba8..c9f1e64 100644 (file)
@@ -22,11 +22,11 @@ function varargout=mtlb_axis(varargin)
         return
     elseif type(listvar(1))<>9 then
         a=gca();
-        rhs=lstsize(listvar)
+        rhs = size(listvar)
     else
         a=listvar(1)
         listvar(1)=null()
-        rhs=lstsize(listvar)
+        rhs = size(listvar)
         listvar=listvar
     end
 
@@ -133,9 +133,9 @@ function varargout=mtlb_axis(varargin)
                 // axis(axes_handles,...)
             elseif type(listvar(krhs))==9 then
                 // krhs must be one
-                for khandle=1:lstsize(listvar(krhs))
+                for khandle=1:size(listvar(krhs))
                     arglist=list()
-                    for kvararg=1:lstsize(listvar)-1
+                    for kvararg=1:size(listvar)-1
                         arglist($+1)=listvar(kvararg+1)
                     end
                     arglist($+1)=listvar(krhs)(khandle)
index 28912d7..a02bcc6 100644 (file)
@@ -15,7 +15,7 @@ function varargout=mtlb_colordef(varargin)
 
     lhs=argn(1);
 
-    if lstsize(varargin)==1 then
+    if size(varargin)==1 then
         color_option=varargin(1)
         fig=[]
 
index c686b9b..e30266d 100644 (file)
@@ -44,9 +44,9 @@ function h=mtlb_plot(varargin)
     colorIndex=1
 
     // plot(Y)
-    if lstsize(varargin)==1 then
+    if size(varargin)==1 then
         mtlb_plotY(varargin(1))
-    elseif lstsize(varargin)==2 then
+    elseif size(varargin)==2 then
 
         // plot(Y,Linespec)
         if type(varargin(2))==10 then
@@ -78,7 +78,7 @@ function h=mtlb_plot(varargin)
             mtlbColor=mtlbColorOrder(colorIndex,:);
         end
         // plot(X,Y,Linespec)
-    elseif lstsize(varargin)==3 & type(varargin(3))==10 then
+    elseif size(varargin)==3 & type(varargin(3))==10 then
         mtlb_plotXY(varargin(1),varargin(2))
         curh=gce()
         curh=curh.children(1)
@@ -98,8 +98,8 @@ function h=mtlb_plot(varargin)
         mtlbColor=mtlbColorOrder(colorIndex,:);
     else
         k=1
-        while k<=lstsize(varargin)
-            if k<lstsize(varargin) & type(varargin(k))<>10 then
+        while k <= size(varargin)
+            if k < size(varargin) & type(varargin(k))<>10 then
                 mtlb_plotXY(varargin(k),varargin(k+1))
                 set(gca(),"auto_clear","off")
                 X=varargin(k)
@@ -113,7 +113,7 @@ function h=mtlb_plot(varargin)
                     colorIndex=1;
                 end
                 mtlbColor=mtlbColorOrder(colorIndex,:);
-            elseif k<=lstsize(varargin) & type(varargin(k))==10 then
+            elseif k <= size(varargin) & type(varargin(k))==10 then
                 opt=varargin(k)
                 opt=convstr(opt,"l")
                 if ~isempty(strindex("linestyle",opt)) then
index bb238af..e8f36a0 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="lstsize" 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="lstsize" xml:lang="en">
     <refnamediv>
         <refname>lstsize</refname>
-        <refpurpose>list, tlist, mlist numbers of entries</refpurpose>
+        <refpurpose>list, tlist, mlist numbers of entries <emphasis role="bold">(obsolete)</emphasis>
+        </refpurpose>
     </refnamediv>
     <refsynopsisdiv>
         <title>Syntax</title>
@@ -78,4 +82,16 @@ lstsize(x)
             </member>
         </simplelist>
     </refsection>
+    <refsection role="history">
+        <title>History</title>
+        <revhistory>
+            <revision>
+                <revnumber>6.0.1</revnumber>
+                <revdescription>
+                    <literal>lstsize()</literal> is declared obsolete, to be removed from Scilab 6.1.
+                    Please use <literal>size()</literal> instead.
+                </revdescription>
+            </revision>
+        </revhistory>
+    </refsection>
 </refentry>
index 76dc703..b4ab335 100644 (file)
@@ -1,8 +1,12 @@
 <?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="lstsize" xml:lang="fr">
+<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="lstsize" xml:lang="fr">
     <refnamediv>
         <refname>lstsize</refname>
-        <refpurpose>nombre d'éléments des objets list, tlist et mlist</refpurpose>
+        <refpurpose>nombre d'éléments des objets list, tlist et mlist   <emphasis role="bold">(obsolète)</emphasis>
+        </refpurpose>
     </refnamediv>
     <refsynopsisdiv>
         <title>Séquence d'appel</title>
@@ -64,4 +68,16 @@ lstsize(x)
             </member>
         </simplelist>
     </refsection>
+    <refsection role="history">
+        <title>Historique</title>
+        <revhistory>
+            <revision>
+                <revnumber>6.0.1</revnumber>
+                <revdescription>
+                    <literal>lstsize()</literal> est déclarée obsolète, pour un retrait de Scilab 6.1.
+                    Elle est remplacée par <literal>size()</literal>.
+                </revdescription>
+            </revision>
+        </revhistory>
+    </refsection>
 </refentry>
index 159b0bb..c8cc5a9 100644 (file)
  *
  -->
 
-<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="lstsize" 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="lstsize" xml:lang="ja">
 
     <refnamediv>
 
         <refname>lstsize</refname>
 
-        <refpurpose>list, tlist, mlist エントリの数</refpurpose>
+        <refpurpose>list, tlist, mlist エントリの数   <emphasis role="bold">(obsolete)</emphasis>
+        </refpurpose>
 
     </refnamediv>
 
@@ -141,6 +145,18 @@ lstsize(x)
         </simplelist>
 
     </refsection>
+    <refsection role="history">
+        <title>履歴</title>
+        <revhistory>
+            <revision>
+                <revnumber>6.0.1</revnumber>
+                <revdescription>
+                    <literal>lstsize()</literal> is declared obsolete, to be removed from Scilab 6.1.
+                    Please use <literal>size()</literal> instead.
+                </revdescription>
+            </revision>
+        </revhistory>
+    </refsection>
 
 </refentry>
 
index d86dec4..0ec3cb3 100644 (file)
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <!--
  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
  * Copyright (C) 2008 - INRIA
  * 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: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="lstsize" 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: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="lstsize" xml:lang="pt">
     <refnamediv>
         <refname>lstsize</refname>
-        <refpurpose>números de entradas de uma lista, tlist ou mlist</refpurpose>
+        <refpurpose>números de entradas de uma lista, tlist ou mlist   <emphasis role="bold">(obsolete)</emphasis>
+        </refpurpose>
     </refnamediv>
     <refsynopsisdiv>
-        <title>Seqüência de Chamamento</title>
+        <title>Seqüência de Chamamento</title>
         <synopsis>n=lstsize(x)</synopsis>
     </refsynopsisdiv>
     <refsection>
-        <title>Parâmetros</title>
+        <title>Parâmetros</title>
         <variablelist>
             <varlistentry>
                 <term>l</term>
             <varlistentry>
                 <term>n</term>
                 <listitem>
-                    <para>um inteiro, número de entradas</para>
+                    <para>um inteiro, número de entradas</para>
                 </listitem>
             </varlistentry>
         </variablelist>
     </refsection>
     <refsection>
-        <title>Descrição</title>
+        <title>Descrição</title>
         <para>
-            <literal>lstsize(x)</literal> retorna o número de entradas de uma
-            lista, tlist ou mlist. Esta função é mais eficiente que a função
+            <literal>lstsize(x)</literal> retorna o número de entradas de uma
+            lista, tlist ou mlist. Esta função é mais eficiente que a função
             <literal>size</literal> e opera de modo semelhante para todos os tipos de
-            listas, enquanto a função <literal>size</literal> fica sobrecarregada para
+            listas, enquanto a função <literal>size</literal> fica sobrecarregada para
             <literal>mlist</literal>'s.
         </para>
     </refsection>
@@ -59,7 +63,7 @@ lstsize(x)
  ]]></programlisting>
     </refsection>
     <refsection role="see also">
-        <title>Ver Também</title>
+        <title>Ver Também</title>
         <simplelist type="inline">
             <member>
                 <link linkend="length">length</link>
@@ -78,4 +82,16 @@ lstsize(x)
             </member>
         </simplelist>
     </refsection>
+    <refsection role="history">
+        <title>Histórico</title>
+        <revhistory>
+            <revision>
+                <revnumber>6.0.1</revnumber>
+                <revdescription>
+                    <literal>lstsize()</literal> is declared obsolete, to be removed from Scilab 6.1.
+                    Please use <literal>size()</literal> instead.
+                </revdescription>
+            </revision>
+        </revhistory>
+    </refsection>
 </refentry>
index 8106fbf..563da59 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="lstsize" 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="lstsize" xml:lang="ru">
     <refnamediv>
         <refname>lstsize</refname>
-        <refpurpose>количество элементов list, tlist, mlist</refpurpose>
+        <refpurpose>количество элементов list, tlist, mlist   <emphasis role="bold">(obsolete)</emphasis>
+        </refpurpose>
     </refnamediv>
     <refsynopsisdiv>
         <title>Синтаксис</title>
@@ -79,4 +83,16 @@ lstsize(x)
             </member>
         </simplelist>
     </refsection>
+    <refsection role="history">
+        <title>История</title>
+        <revhistory>
+            <revision>
+                <revnumber>6.0.1</revnumber>
+                <revdescription>
+                    <literal>lstsize()</literal> is declared obsolete, to be removed from Scilab 6.1.
+                    Please use <literal>size()</literal> instead.
+                </revdescription>
+            </revision>
+        </revhistory>
+    </refsection>
 </refentry>
index 417d653..58e305b 100644 (file)
@@ -27,7 +27,6 @@ int sci_scilist(char *fname, unsigned long fname_len);
 int sci_scitlist(char *fname, unsigned long fname_len);
 int sci_lstcat(char *fname, unsigned long fname_len);
 int sci_scimlist(char *fname, unsigned long fname_len);
-int sci_lstsize(char *fname, unsigned long fname_len);
 /*--------------------------------------------------------------------------*/
 #endif /*  __GW_DATA_STRUCTURES1__ */
 /*--------------------------------------------------------------------------*/
index 72c19c9..c9e904c 100644 (file)
@@ -12,6 +12,7 @@
 
 
 function l=lstsize(varargin)
+    warnobsolete("size()","6.1");
     [lhs, rhs] = argn(0);
     if lhs <> 1 then
         error(999, msprintf(_("%s: Wrong number of output arguments: %d expected.\n"), "lstsize", 1));
index 2305e61..6b91ed4 100644 (file)
@@ -44,7 +44,6 @@
     <PRIMITIVE gatewayId="17" primitiveId="6" primitiveName="lstcat" />
     <PRIMITIVE gatewayId="17" primitiveId="7" primitiveName="mlist" />
     <PRIMITIVE gatewayId="17" primitiveId="8" primitiveName="definedfields" />
-    <PRIMITIVE gatewayId="17" primitiveId="9" primitiveName="lstsize" />
     <PRIMITIVE gatewayId="41" primitiveId="1" primitiveName="getfield" />
     <PRIMITIVE gatewayId="41" primitiveId="2" primitiveName="setfield" />
 </GATEWAY>
index ba80ef6..f628959 100644 (file)
@@ -243,13 +243,13 @@ function r=%CMP(%A,%B)
     case 14 then //library
         if or(gsort(string(%A))<>gsort(string(%B))) then  r=%t,return,end
     case 15 then //list
-        if or(lstsize(%A)<>lstsize(%B)) then  r=%t,return,end
+        if or(size(%A) <> size(%B)) then  r=%t,return,end
         if or(definedfields(%A)<>definedfields(%B)) then r=%t,return,end
         for k = definedfields(%A)
             if %CMP(%A(k),%B(k)) then r=%t,return,end
         end
     case 16 then //tlist
-        if or(lstsize(%A)<>lstsize(%B)) then  r=%t,return,end
+        if or(size(%A) <> size(%B)) then  r=%t,return,end
         if or(definedfields(%A)<>definedfields(%B)) then r=%t,return,end
         if typeof(%A)=="rational" then
             if or(clean(%A-%B)<>0) then r=%t,end
@@ -259,7 +259,7 @@ function r=%CMP(%A,%B)
             if %CMP(%A(k),%B(k)) then r=%t,return,end
         end
     case 17 then //mlist
-        if or(lstsize(%A)<>lstsize(%B)) then  r=%t,return,end
+        if or(size(%A) <> size(%B)) then  r=%t,return,end
         if or(definedfields(%A)<>definedfields(%B)) then r=%t,return,end
         for k = definedfields(%A)
             if %CMP(getfield(k,%A),getfield(k,%B)) then r=%t,return,end
index 0ff6dff..4b7713e 100644 (file)
@@ -312,7 +312,7 @@ function C=expression2code(e)
     case "list"
         // Recursive extraction
         C=""
-        for k=1:lstsize(e)
+        for k=1:size(e)
             ind=expression2code(e(k))
             if type(e(k))==15 then // Recursive extraction in recursive extraction
                 ind=strsubst(ind,")(",",")
index ec6c22c..095e148 100644 (file)
@@ -15,7 +15,7 @@ function r=%h_e(i,h)
     if type(i)==10 then
         r=get(h,i)
     elseif type(i)==15 then
-        n=lstsize(i)
+        n = size(i)
 
         for k=1:n
             p=i(k)
index ffca28c..6dfef55 100644 (file)
 
 function out_vect = %h_get(varargin)
     out_vect = [];
-    if (lstsize(varargin) == 2)
+    if (size(varargin) == 2)
         hdl = varargin(1)
         str = varargin(2)
         for i=1:size(hdl,"*")
             out_vect = [out_vect ; get(hdl(i),str)]
         end
 
-    elseif (lstsize(varargin) == 1)
+    elseif (size(varargin) == 1)
         str = varargin(1)
         out_vect = get(str)
     end
index de3ae55..1688ea6 100644 (file)
@@ -10,7 +10,7 @@
 // along with this program.
 
 function hdl=%h_set(varargin)
-    if (lstsize(varargin) == 3)
+    if (size(varargin) == 3)
         hdl = varargin(1)
         str = varargin(2)
         val = varargin(3)
@@ -18,7 +18,7 @@ function hdl=%h_set(varargin)
             set(hdl(i),str,val)
         end,
 
-    elseif (lstsize(varargin) == 2)
+    elseif (size(varargin) == 2)
         str = varargin(1)
         val = varargin(2)
         hdl=[]
index 6d7f5a6..685cd9c 100644 (file)
@@ -265,14 +265,14 @@ function [sci_clause,nblines]=clause2sci(mtlb_clause,nblines,leveltemp)
                     [instr,nblines]=instruction2sci(mtlb_clause.statements(k).sup_instr(i),nblines)
                     // If inserted instruction is an initialisation, it has to be done just one time and before loop
                     l=1;
-                    while l<=lstsize(m2sci_to_insert_b)
+                    while l <= size(m2sci_to_insert_b)
                         if typeof(m2sci_to_insert_b(l))=="equal" & ..
                             (and(m2sci_to_insert_b(l).expression==Cste([])) | ..
                             and(m2sci_to_insert_b(l).expression==Funcall("struct",1,list(),list())) | ..
                             and(m2sci_to_insert_b(l).expression==Funcall("cell",1,list(),list())) ) then
                             to_insert($+1)=m2sci_to_insert_b(l)
                             m2sci_to_insert_b(l)=null()
-                            if lstsize(m2sci_to_insert_b)>=l & m2sci_to_insert_b(l)==list("EOL") then
+                            if size(m2sci_to_insert_b)>=l & m2sci_to_insert_b(l)==list("EOL") then
                                 to_insert($+1)=m2sci_to_insert_b(l)
                                 m2sci_to_insert_b(l)=null()
                             end
@@ -287,14 +287,14 @@ function [sci_clause,nblines]=clause2sci(mtlb_clause,nblines,leveltemp)
                 [instr,nblines]=instruction2sci(mtlb_clause.statements(k),nblines)
                 // If inserted instruction is an initialisation, it has to be done just one time and before loop
                 l=1;
-                while l<=lstsize(m2sci_to_insert_b)
+                while l <= size(m2sci_to_insert_b)
                     if typeof(m2sci_to_insert_b(l))=="equal" & ..
                         (and(m2sci_to_insert_b(l).expression==Cste([])) | ..
                         and(m2sci_to_insert_b(l).expression==Funcall("struct",1,list(),list())) | ..
                         and(m2sci_to_insert_b(l).expression==Funcall("cell",1,list(),list())) ) then
                         to_insert($+1)=m2sci_to_insert_b(l)
                         m2sci_to_insert_b(l)=null()
-                        if lstsize(m2sci_to_insert_b)>=l & m2sci_to_insert_b(l)==list("EOL") then
+                        if size(m2sci_to_insert_b)>=l & m2sci_to_insert_b(l)==list("EOL") then
                             to_insert($+1)=m2sci_to_insert_b(l)
                             m2sci_to_insert_b(l)=null()
                         end
@@ -336,14 +336,14 @@ function [sci_clause,nblines]=clause2sci(mtlb_clause,nblines,leveltemp)
                     [instr,nblines]=instruction2sci(mtlb_clause.statements(k).sup_instr(i),nblines)
                     // If inserted instruction is an initialisation, it has to be done just one time and before loop
                     l=1;
-                    while l<=lstsize(m2sci_to_insert_b)
+                    while l <= size(m2sci_to_insert_b)
                         if typeof(m2sci_to_insert_b(l))=="equal" & ..
                             (and(m2sci_to_insert_b(l).expression==Cste([])) | ..
                             and(m2sci_to_insert_b(l).expression==Funcall("struct",1,list(),list())) | ..
                             and(m2sci_to_insert_b(l).expression==Funcall("cell",1,list(),list())) ) then
                             to_insert($+1)=m2sci_to_insert_b(l)
                             m2sci_to_insert_b(l)=null()
-                            if lstsize(m2sci_to_insert_b)>=l & m2sci_to_insert_b(l)==list("EOL") then
+                            if size(m2sci_to_insert_b)>=l & m2sci_to_insert_b(l)==list("EOL") then
                                 to_insert($+1)=m2sci_to_insert_b(l)
                                 m2sci_to_insert_b(l)=null()
                             end
@@ -358,14 +358,14 @@ function [sci_clause,nblines]=clause2sci(mtlb_clause,nblines,leveltemp)
                 [instr,nblines]=instruction2sci(mtlb_clause.statements(k),nblines)
                 // If inserted instruction is an initialisation, it has to be done just one time and before loop
                 l=1;
-                while l<=lstsize(m2sci_to_insert_b)
+                while l <= size(m2sci_to_insert_b)
                     if typeof(m2sci_to_insert_b(l))=="equal" & ..
                         (and(m2sci_to_insert_b(l).expression==Cste([])) | ..
                         and(m2sci_to_insert_b(l).expression==Funcall("struct",1,list(),list())) | ..
                         and(m2sci_to_insert_b(l).expression==Funcall("cell",1,list(),list())) ) then
                         to_insert($+1)=m2sci_to_insert_b(l)
                         m2sci_to_insert_b(l)=null()
-                        if lstsize(m2sci_to_insert_b)>=l & m2sci_to_insert_b(l)==list("EOL") then
+                        if size(m2sci_to_insert_b)>=l & m2sci_to_insert_b(l)==list("EOL") then
                             to_insert($+1)=m2sci_to_insert_b(l)
                             m2sci_to_insert_b(l)=null()
                         end
index c3c074d..904592e 100644 (file)
@@ -64,7 +64,7 @@ function tree=default_trad(tree)
     elseif isdefinedvar(Variable(tree.name,Infer())) then
         operands=list()
         operands(1)=Variable(tree.name,Infer())
-        for krhs=1:lstsize(tree.rhs)
+        for krhs = 1:size(tree.rhs)
             operands($+1)=tree.rhs(krhs)
         end
         tree=Operation("ext",operands,tree.lhs)
index 25833ac..1b49381 100644 (file)
@@ -93,7 +93,7 @@ function [sci_expr]=expression2sci(mtlb_expr,lhslist)
         end
         // --- operand is a list (only for operations) ---
     case "list"
-        if lstsize(mtlb_expr)==1 & mtlb_expr==list("EOL") then
+        if size(mtlb_expr)==1 & mtlb_expr==list("EOL") then
             sci_expr=mtlb_expr
             return
         end
index 77390ab..17cb9ff 100644 (file)
@@ -31,7 +31,7 @@ function txt=infer2txt(infer)
         tp="Boolean"
     elseif tp==16 then
         tp="Struct"
-        for k=1:lstsize(infer.contents.index)
+        for k = 1:size(infer.contents.index)
             if typeof(infer.contents.index(k))<>"list" then
                 txt=[txt;expression2code(list(infer.contents.index(k)))+infer2txt(infer.contents.data(k))]
             else
@@ -40,7 +40,7 @@ function txt=infer2txt(infer)
         end
     elseif tp==17 then
         tp="Cell"
-        for k=1:lstsize(infer.contents.index)
+        for k = 1:size(infer.contents.index)
             if typeof(infer.contents.index(k))<>"list" then
                 txt=[txt;expression2code(list(infer.contents.index(k)))+infer2txt(infer.contents.data(k))]
             else
index 2a21950..81899fe 100644 (file)
@@ -281,13 +281,13 @@ function [scitree,trad,txt,crp]=m2sci(mtlbtree,nam,Recmode,prettyprintoutput)
                 ]
             else
                 trad=[trad;
-                "for k=1:min(lstsize(dims),lhs)"
+                "for k=1:min(size(dims),lhs)"
                 "  tree.lhs(k).dims=dims(k)"
                 "  tree.lhs(k).vtype=vtype(k)"
                 "  tree.lhs(k).property=prop(k)"
                 "end"
                 gettext("// Inference for varargout")
-                "for k=min(lstsize(dims),lhs)+1:lhs"
+                "for k=min(size(dims),lhs)+1:lhs"
                 "  tree.lhs(k).dims=list(Unknown,Unknown)"
                 "  tree.lhs(k).vtype=Unknown"
                 "  tree.lhs(k).property=Unknown"
index bd30029..fd94a61 100644 (file)
@@ -161,13 +161,13 @@ function []=sci_m2scideclare(def)
                 contents.index($+1)=t.statements(2).expression.rhs(1);
             end
             clear m2scitmp
-            for k=1:lstsize(contents.index($))
+            for k = 1:size(contents.index($))
                 if typeof(contents.index($)(k))=="variable" & contents.index($)(k).name=="%genericm2sciindex" then
                     contents.index($)(k)=Cste("*")
                 elseif typeof(contents.index($)(k))=="cste" then
                     contents.index($)(k)=Cste(contents.index($)(k).value)
                 elseif typeof(contents.index($)(k))=="list" then
-                    for kk=1:lstsize(contents.index($)(k))
+                    for kk = 1:size(contents.index($)(k))
                         if typeof(contents.index($)(k)(kk))=="variable" & contents.index($)(k)(kk).name=="%genericm2sciindex" then
                             contents.index($)(k)(kk)=Cste("*")
                         elseif typeof(contents.index($)(k)(kk))=="cste" then
@@ -188,7 +188,7 @@ function []=sci_m2scideclare(def)
             infereddims=varslist(index).dims
 
             err=%F
-            for kd=1:min([lstsize(vardims) lstsize(infereddims)])
+            for kd=1:min([size(vardims) size(infereddims)])
                 if infereddims(kd)~=vardims(kd) & infereddims(kd)<>Unknown then
                     err=%T
                     break
@@ -229,13 +229,13 @@ function []=sci_m2scideclare(def)
                 contents.index($+1)=t.statements(2).expression.rhs(1);
             end
             clear m2scitmp
-            for k=1:lstsize(contents.index($))
+            for k=1:size(contents.index($))
                 if typeof(contents.index($)(k))=="variable" & contents.index($)(k).name=="%genericm2sciindex" then
                     contents.index($)(k)=Cste("*")
                 elseif typeof(contents.index($)(k))=="cste" then
                     contents.index($)(k)=Cste(contents.index($)(k).value)
                 elseif typeof(contents.index($)(k))=="list" then
-                    for kk=1:lstsize(contents.index($)(k))
+                    for kk=1:size(contents.index($)(k))
                         if typeof(contents.index($)(k)(kk))=="variable" & contents.index($)(k)(kk).name=="%genericm2sciindex" then
                             contents.index($)(k)(kk)=Cste("*")
                         elseif typeof(contents.index($)(k)(kk))=="cste" then
@@ -270,7 +270,7 @@ function []=sci_m2scideclare(def)
             infereddims=varslist(index).dims
 
             err=%F
-            for kd=1:min([lstsize(dims) lstsize(infereddims)])
+            for kd=1:min([size(dims) size(infereddims)])
                 if infereddims(kd)~=dims(kd) & infereddims(kd)<>Unknown then
                     err=%T
                     break
@@ -339,7 +339,7 @@ endfunction
 
 function str=dims2str(dims)
     str=""
-    for kd=1:lstsize(dims)
+    for kd=1:size(dims)
         str=str+string(dims(kd))+" "
     end
 endfunction
index 50b93b3..0fb0ade 100644 (file)
@@ -24,7 +24,7 @@ function [instr_list]=update_instr_list(instr_list,instr)
     end
 
     // Get instructions that must be inserted before converted instruction
-    for k=1:lstsize(m2sci_to_insert_b)
+    for k = 1:size(m2sci_to_insert_b)
         if m2sci_to_insert_b(k)<>list() then
             instr_list($+1)=m2sci_to_insert_b(k)
         end
@@ -38,7 +38,7 @@ function [instr_list]=update_instr_list(instr_list,instr)
     end
 
     // Get instructions that must be inserted after converted instruction
-    for k=1:lstsize(m2sci_to_insert_a)
+    for k = 1:size(m2sci_to_insert_a)
         if m2sci_to_insert_a(k)<>list() then
             instr_list($+1)=m2sci_to_insert_a(k)
         end
index 2224f6c..ccf7566 100644 (file)
@@ -137,7 +137,7 @@ function []=updatevarslist(instr_lhs)
         ierr=execstr("zz=instr_lhs(k).contents.index","errcatch")
         if ierr<>0 then pause;end
         // Remove multiple entries from contents
-        for kcont=lstsize(instr_lhs(k).contents.index):-1:1
+        for kcont = size(instr_lhs(k).contents.index):-1:1
             [infertlist,pos]=get_contents_infer(instr_lhs(k),instr_lhs(k).contents.index(kcont))
             if pos<>0 & pos<>kcont then
                 instr_lhs(k).contents.index(pos)=null()
@@ -219,7 +219,7 @@ function []=merge_vars(oldvarindex,newvar)
     end
 
     // Verify contents
-    for k=1:lstsize(newvar.contents.index)
+    for k = 1:size(newvar.contents.index)
         olddata=get_contents_infer(oldvar,newvar.contents.index(k))
         newdata=newvar.contents.data(k)
 
index f3d1165..a78ca0d 100644 (file)
@@ -40,13 +40,13 @@ function tree=%cc_cell2sci(tree)
         // Second operand is a rc or a +
         op=tree.operands(2)
         for kd2=1:dim2-1
-            for ki=lstsize(INFER):-1:1
+            for ki = size(INFER):-1:1
                 INFER(ki+1)=INFER(ki)
             end
             INFER(1)=op.operands(2).infer
             op=op.operands(1)
         end
-        for ki=lstsize(INFER):-1:1
+        for ki = size(INFER):-1:1
             INFER(ki+1)=INFER(ki)
         end
         INFER(1)=op.infer
index 6135e2b..c4234d7 100644 (file)
@@ -59,7 +59,7 @@ function [tree]=%e2sci(tree)
         ind=tree.operands(2)
         // --- Recursive extraction ---
         if type(ind)==15 then
-            for kind=1:lstsize(ind)
+            for kind = 1:size(ind)
                 if type(ind(kind))<>15 then
                     if ind(kind).vtype==String then
                         if ind(kind).value=="entries" then
@@ -148,7 +148,7 @@ function [tree]=%e2sci(tree)
                 dims(k-1)=1
                 if typeof(tree.operands(k))=="cste" then
                     if tree.operands(k).value==":" then
-                        if k<=lstsize(var.dims)+1 then
+                        if k <= size(var.dims)+1 then
                             dims(k-1)=var.dims(k-1);
                         else
                             dims(k-1)=Unknown;
index 934d59d..0ce7b8f 100644 (file)
@@ -46,7 +46,7 @@ function [tree]=%e_ce2sci(tree)
             end
 
             // Change index value if just one double
-            for k=1:lstsize(infertree)
+            for k = 1:size(infertree)
                 if typeof(infertree(k))=="cste" | (typeof(infertree(k))<>"list" & is_a_scalar(infertree(k))) then
                     if infertree(k).vtype<>String then
                         infertree(k)=list(Cste(1),infertree(k))
@@ -77,7 +77,7 @@ function [tree]=%e_ce2sci(tree)
                 if typeof(infertree)<>"list" then
                     infertree=list(infertree);
                 end
-                for k=1:lstsize(infertree)
+                for k = 1:size(infertree)
                     oplist($+1)=infertree(k)
                 end
                 newop=Operation("ext",oplist,tree.out)
@@ -118,7 +118,7 @@ function [tree]=%e_ce2sci(tree)
                     tree.out(1).dims=ind.dims
                 else
                     dprod=1
-                    for kd=1:lstsize(var.dims)
+                    for kd = 1:size(var.dims)
                         dprod=dprod*var.dims(kd)
                         if dprod<0 then
                             break
index dac67fe..2de8f34 100644 (file)
@@ -45,7 +45,7 @@ function [tree]=%e_st2sci(tree)
                 infertree($)=null()
             end
             // Change index value if just one double
-            for k=1:lstsize(infertree)
+            for k = 1:size(infertree)
                 if typeof(infertree(k))=="cste" | (typeof(infertree(k))<>"list" & is_a_scalar(infertree(k))) then
                     if infertree(k).vtype<>String then
                         infertree(k)=list(Cste(1),infertree(k))
index 63ba80a..bc7b2cf 100644 (file)
@@ -126,7 +126,7 @@ function [tree]=%i2sci(tree)
         else
             indexisstr=%F
             iscell=%F
-            for k=1:lstsize(ind)
+            for k = 1:size(ind)
                 if type(ind(k))<>15 then
                     if ind(k).vtype==String then
                         if typeof(ind(k))=="cste" & ind(k).value=="entries" then
@@ -159,7 +159,7 @@ function [tree]=%i2sci(tree)
             m2sci_insert(Equal(list(to),Funcall("mtlb_is",1,Rhs_tlist(to,from,tree.operands(2),tree.operands(3)),list(to))),1)
         else
             tree.out(1).dims=list()
-            for k=1:lstsize(tree.operands)-2
+            for k = 1:size(tree.operands)-2
                 tree.out(1).dims(k)=Unknown
             end
             // dim can be infered when index is a constant and when index value is greater than older dim and this dim is not unknown
@@ -176,12 +176,12 @@ function [tree]=%i2sci(tree)
             end
             if is_empty(to) then
                 // a(k,:)=b with a==[] is converted by a(1,1:length(b))=b
-                if lstsize(tree.operands)-2 == 2 & typeof(tree.operands($-1))=="cste" & tree.operands($-1).value==":" then
+                if size(tree.operands)-2 == 2 & typeof(tree.operands($-1))=="cste" & tree.operands($-1).value==":" then
                     length_funcall=Funcall("length",1,Rhs_tlist(tree.operands($)),list())
                     tree.operands($-1)=Operation(":",list(Cste(1),length_funcall),list())
                 end
                 // a(:,k)=b with a==[] is converted by a(1:length(b),1)=b
-                if lstsize(tree.operands)-2 == 2 & typeof(tree.operands($-2))=="cste" & tree.operands($-2).value==":" then
+                if size(tree.operands)-2 == 2 & typeof(tree.operands($-2))=="cste" & tree.operands($-2).value==":" then
                     length_funcall=Funcall("length",1,Rhs_tlist(tree.operands($)),list())
                     tree.operands($-2)=Operation(":",list(Cste(1),length_funcall),list())
                 end
index 560abcb..0e0f35b 100644 (file)
@@ -23,7 +23,7 @@ function [tree]=%i_ce2sci(tree)
     if type(inds)<>15 then
         inds=list(inds)
     end
-    for kinds=1:lstsize(inds)
+    for kinds=1:size(inds)
         if typeof(inds(kinds))<>"list" & inds(kinds).vtype==String & typeof(inds(kinds))=="cste" & inds(kinds).value<>":" then
             tree=%i_st2sci(tree)
             return
@@ -61,7 +61,7 @@ function [tree]=%i_ce2sci(tree)
                     tree.out(1).contents.index($+1)=tree.operands(2)
                     tree.out(1).contents.data($+1)=Infer(list(1,1),Type(Cell,Unknown),from.contents)
 
-                    if lstsize(from.contents.data)==1 then
+                    if size(from.contents.data)==1 then
                         tree.out(1).contents.index($+1)=list(tree.operands(2),Cste("entries"))
                         tree.out(1).contents.data($+1)=from.contents.data(1)
                     else
@@ -75,7 +75,7 @@ function [tree]=%i_ce2sci(tree)
             end
         else // --- Insertion with more than one index value (index is a list) ---
             // Cell array of struct A{p,q,...}.name... or recursive index A{p,q,...}(1,2)...
-            for kind=1:lstsize(tree.operands(2))
+            for kind = 1:size(tree.operands(2))
                 if typeof(tree.operands(2)(kind))=="cste" then
                     if tree.operands(2)(kind).vtype<>String then
                         tree.operands(2)(kind)=list(Cste(1),tree.operands(2)(kind))
@@ -85,12 +85,12 @@ function [tree]=%i_ce2sci(tree)
             IND=tree.operands(2)(1)
             // Update cell dims for inference
             if typeof(IND)=="list" then
-                if lstsize(IND)>lstsize(tree.out(1).dims) then
-                    for kd=lstsize(tree.out(1).dims):lstsize(IND)
+                if size(IND) > size(tree.out(1).dims) then
+                    for kd =size(tree.out(1).dims):size(IND)
                         tree.out(1).dims(kd)=Unknown
                     end
                 end
-                for kd=1:lstsize(tree.out(1).dims)
+                for kd=1:size(tree.out(1).dims)
                     if typeof(IND(kd))=="cste" & tree.out(1).dims(kd)<>Unknown & tree.out(1).dims(kd)<IND(kd).value then
                         tree.out(1).dims(kd)=IND(kd).value
                     end
@@ -134,7 +134,7 @@ function [tree]=%i_ce2sci(tree)
         // Two indexes: to(ind1,ind2,...)=from or more
     else
         tree.out(1).dims=list()
-        for k=1:lstsize(tree.operands)-2
+        for k=1:size(tree.operands)-2
             tree.out(1).dims(k)=Unknown
         end
 
@@ -162,10 +162,10 @@ function [tree]=%i_ce2sci(tree)
         tree.out(1).contents.data($+1)=Infer(list(1,1),Type(Cell,Unknown),Contents())
 
         infertree=list(infertree,Cste("entries"))
-        if lstsize(from.contents.index)==1 then
+        if size(from.contents.index)==1 then
             tree.out(1).contents.index($+1)=infertree
             tree.out(1).contents.data($+1)=from.contents.data(1);
-        elseif lstsize(from.contents.index)==0 then
+        elseif size(from.contents.index)==0 then
             tree.out(1).contents=Contents()
         else
             error(gettext("Not yet implemented."))
index 36a3821..579a443 100644 (file)
@@ -61,7 +61,7 @@ function [tree]=%i_st2sci(tree)
 
                             // Update contents for an extraction of type: z = X(p)
                             CONT=Contents()
-                            for k=1:lstsize(from.infer.contents.index)
+                            for k = 1:size(from.infer.contents.index)
                                 if type(from.contents.index(k)(1))==15 then
                                     CONT.index($+1)=list(from.contents.index(k)(2))
                                 else
@@ -72,7 +72,7 @@ function [tree]=%i_st2sci(tree)
                             tree.out(1).contents.data($+1)=Infer(list(1,1),Type(Struct,Unknown),CONT)
 
                             // Update contents for extraction of type: z = X(p).f
-                            for k=1:lstsize(from.infer.contents.index)
+                            for k = 1:size(from.infer.contents.index)
                                 if type(from.contents.index(k)(1))==15 then
                                     tree.out(1).contents.index($+1)=list(list(Cste(1),ind),from.contents.index(k)(2))
                                 else
@@ -97,7 +97,7 @@ function [tree]=%i_st2sci(tree)
         else
 
             // Change index value if just one double
-            for k=1:lstsize(ind)
+            for k = 1:size(ind)
                 //ind(k+1) <-> tree.operands(2)(k+1)
                 if typeof(ind(k))=="cste" | (typeof(ind(k))<>"list" & is_a_scalar(ind(k))) then
                     if ind(k).vtype<>String then
@@ -136,12 +136,12 @@ function [tree]=%i_st2sci(tree)
             if typeof(infertree(1))=="list" then
                 possible_dims=infertree(1)
                 infdims=tree.out(1).dims
-                if lstsize(infdims)<lstsize(possible_dims) then
-                    for k=lstsize(infdims)+1:lstsize(possible_dims)
+                if size(infdims) < size(possible_dims) then
+                    for k = size(infdims) + 1:size(possible_dims)
                         infdims(k)=Unknown
                     end
                 end
-                for k=1:lstsize(possible_dims)
+                for k=1:size(possible_dims)
                     if typeof(possible_dims(k))<>"cste" then
                         infdims(k)=Unknown
                     elseif infdims(k)<>Unknown & infdims(k)<possible_dims(k).value then
@@ -164,7 +164,7 @@ function [tree]=%i_st2sci(tree)
         // Two indexes: to(ind1,ind2,...)=from or more
     else
         tree.out(1).dims=list()
-        for k=1:lstsize(tree.operands)-2
+        for k = 1:size(tree.operands)-2
             tree.out(1).dims(k)=Unknown
         end
 
index 998058e..a4109f4 100644 (file)
@@ -22,15 +22,15 @@ function [infertlist,pos]=get_contents_infer(from,index)
     pos=0;
     infertlist=Infer();
 
-    for k=1:lstsize(from.contents.index)
+    for k = 1:size(from.contents.index)
         allequal=[]
-        if lstsize(index)==lstsize(from.contents.index(k)) then // Indexes must have the same size
-            for ki=1:lstsize(index)
+        if size(index)==size(from.contents.index(k)) then // Indexes must have the same size
+            for ki = 1:size(index)
                 if typeof(index(ki))==typeof(from.contents.index(k)(ki)) then // Index elements must have the same type
                     if typeof(index(ki))<>"list" then
                         allequal=allequal & ( and(index(ki)==from.contents.index(k)(ki)) | and(from.contents.index(k)(ki)==Cste("*")) )
                     elseif typeof(index(ki))=="list" then
-                        for kii=1:lstsize(index(ki))
+                        for kii = 1:size(index(ki))
                             allequal=allequal & ( and(index(ki)(kii)==from.contents.index(k)(ki)(kii)) | and(from.contents.index(k)(ki)(kii)==Cste("*")) )
                         end
                     end
index e84f9e6..d09d15f 100644 (file)
@@ -40,7 +40,7 @@ function [tree]=sci_hankel(tree)
         end
 
         dim=1
-        for kd=1:lstsize(tree.rhs(1).dims)
+        for kd = 1:size(tree.rhs(1).dims)
             if tree.rhs(1).dims(kd)<>Unknown then
                 dim=dim*tree.rhs(1).dims(kd)
             else
@@ -83,7 +83,7 @@ function [tree]=sci_hankel(tree)
         v=Operation("rc",list(cmatrix_funcall,rmatrix_funcall),list())
 
         dim1=1
-        for kd=1:lstsize(tree.rhs(1).dims)
+        for kd = 1:size(tree.rhs(1).dims)
             if tree.rhs(1).dims(kd)<>Unknown then
                 dim1=dim1*tree.rhs(1).dims(kd)
             else
@@ -92,7 +92,7 @@ function [tree]=sci_hankel(tree)
             end
         end
         dim2=1
-        for kd=1:lstsize(tree.rhs(2).dims)
+        for kd = 1:size(tree.rhs(2).dims)
             if tree.rhs(2).dims(kd)<>Unknown then
                 dim2=dim2*tree.rhs(2).dims(kd)
             else
@@ -101,9 +101,9 @@ function [tree]=sci_hankel(tree)
             end
         end
 
-        tree.lhs(1).dims=list(dim1,dim2)
-        tree.lhs(1).type=tree.rhs(1).type
+        tree.lhs(1).dims = list(dim1,dim2)
+        tree.lhs(1).type = tree.rhs(1).type
 
-        tree.rhs=Rhs_tlist(m,n,v);
+        tree.rhs = Rhs_tlist(m,n,v);
     end
 endfunction
index 9f69959..92724c9 100644 (file)
@@ -20,7 +20,7 @@ function [tree]=sci_horzcat(tree)
     out=tree.lhs
 
     op="rc"
-    for k=1:lstsize(allargs)
+    for k = 1:size(allargs)
         if allargs(k).vtype==String then
             op="+"
             break
@@ -37,11 +37,11 @@ function [tree]=sci_horzcat(tree)
 
     // Dimensions
     outdims=allargs(1).dims
-    for k=1:lstsize(outdims)
+    for k = 1:size(outdims)
         outdims(k)=Unknown
     end
     for k=1:rhs
-        for l=1:lstsize(allargs(k).dims)
+        for l = 1:size(allargs(k).dims)
             if l<>2 & allargs(k).dims(l)<>Unknown then
                 outdims(l)=allargs(k).dims(l)
             end
index 148ac2f..5b80eeb 100644 (file)
@@ -34,7 +34,7 @@ function [tree]=sci_makecell(tree)
 
         for kr=1:double(tree.rhs(1).dims(1))-1
 
-            for krhs=lstsize(tmprhslist):-1:2
+            for krhs = size(tmprhslist):-1:2
                 tmprhslist(krhs+1)=tmprhslist(krhs)
             end
 
@@ -42,7 +42,7 @@ function [tree]=sci_makecell(tree)
             inrhs=inrhs.operands(1)
         end
 
-        for krhs=lstsize(tmprhslist):-1:2
+        for krhs = size(tmprhslist):-1:2
             tmprhslist(krhs+1)=tmprhslist(krhs)
         end
         tmprhslist(2)=inrhs
@@ -57,11 +57,11 @@ function [tree]=sci_makecell(tree)
 
         tmprhslist(1)=null()
 
-        for ksz=lstsize(tmprhslist):-1:1
+        for ksz = size(tmprhslist):-1:1
             inrhs=tmprhslist(ksz)
             for kr=1:double(tree.rhs(1).dims(2))-1
 
-                for krhs=lstsize(rhslist):-1:2
+                for krhs = size(rhslist):-1:2
                     rhslist(krhs+1)=rhslist(krhs)
                 end
 
@@ -69,7 +69,7 @@ function [tree]=sci_makecell(tree)
                 inrhs=inrhs.operands(1)
             end
 
-            for krhs=lstsize(rhslist):-1:2
+            for krhs = size(rhslist):-1:2
                 rhslist(krhs+1)=rhslist(krhs)
             end
             rhslist(2)=inrhs
index d9a8308..705a095 100644 (file)
@@ -24,7 +24,7 @@ function [tree]=sci_repmat(tree)
         if A.vtype==Unknown then
             tree.name="mtlb_repmat"
             if typeof(m)=="cste" then
-                for kd=1:lstsize(A.dims)
+                for kd = 1:size(A.dims)
                     tree.lhs(1).dims(kd)=A.dims(kd)*m.value
                     if tree.lhs(1).dims(kd)<0 then
                         tree.lhs(1).dims(kd)=Unknown
index 024f722..2689b09 100644 (file)
@@ -21,7 +21,7 @@ function [tree]=sci_struct(tree)
     // Dims...
     dims=tree.rhs(2).dims
     for k=4:2:rhs
-        for l=1:lstsize(dims)
+        for l = 1:size(dims)
             if tree.rhs(k).dims(l)==Unknown then
                 dims(l)=Unknown
             else
index d75cee7..e652dca 100644 (file)
@@ -29,11 +29,11 @@ function [tree]=sci_vertcat(tree)
 
     // Dimensions
     outdims=allargs(1).dims
-    for k=1:lstsize(outdims)
+    for k = 1:size(outdims)
         outdims(k)=Unknown
     end
     for k=1:rhs
-        for l=1:lstsize(allargs(k).dims)
+        for l = 1:size(allargs(k).dims)
             if l<>1 & allargs(k).dims(l)<>Unknown then
                 outdims(l)=allargs(k).dims(l)
             end
index 4120966..5ff6cb9 100644 (file)
@@ -45,7 +45,7 @@ function loadmatfile(varargin)
         // or the second parameter: loadmatfile(filetype,filename[,opts]) with filetype equal to -ascii or -mat
         // filetype can also be included in opts
         k=1
-        while k<=lstsize(varargin)
+        while k <= size(varargin)
             select varargin(k)
             case "-mat"
                 bin=%T
@@ -55,7 +55,7 @@ function loadmatfile(varargin)
                 k=k+1
             case "-regexp"
                 warning(msprintf(gettext("%s: This feature has not been implemented: %s."),"loadmatfile","-regexp"));
-                while k<=lstsize(varargin) & and(varargin(k)<>["-mat","-ascii"])
+                while k <= size(varargin) & and(varargin(k)<>["-mat","-ascii"])
                     k=k+1
                 end
             else
index 288dfd3..8b69049 100644 (file)
@@ -40,7 +40,7 @@ function savematfile(varargin)
 
     // Sort all inputs (Options/Names/Filename)
     k=1
-    while k<=lstsize(varargin)
+    while k <= size(varargin)
         // All options are converted to lower case
         if part(varargin(k),1)=="-" then
             varargin(k)=convstr(varargin(k));
@@ -62,8 +62,8 @@ function savematfile(varargin)
             stname=varargin(k);
             k=k+1;
             // Verify if one or more field name is/are given
-            if k<=lstsize(varargin) & part(varargin(k),1)<>"-" & mtlb_thefile<>"" then // struct field
-                while k<=lstsize(varargin) & part(varargin(k),1)<>"-"
+            if k <= size(varargin) & part(varargin(k),1)<>"-" & mtlb_thefile<>"" then // struct field
+                while k <= size(varargin) & part(varargin(k),1)<>"-"
                     // Add field to variable names
                     mtlb_names=[mtlb_names;varargin(k)];
                     execstr(varargin(k)+"="+stname+"(mtlb_names($))");
@@ -103,7 +103,7 @@ function savematfile(varargin)
             k=k+1
         case "-regexp"
             warning(msprintf(gettext("Option %s not implemented: IGNORED."),"-regexp"));
-            while k<=lstsize(varargin) & and(varargin(k)<>["-mat","-ascii"])
+            while k <= size(varargin) & and(varargin(k)<>["-mat","-ascii"])
                 k=k+1
             end
         else
index 750e33d..e072c87 100644 (file)
@@ -21,7 +21,7 @@ function h=%3d_i_h(i,v,h)
         else
             index=:
         end
-        n=lstsize(i)
+        n = size(i)
         for k=1:n-1
             p=i(k)
             if type(p)==10 then
index 5832fe7..33c11fe 100644 (file)
@@ -21,7 +21,7 @@ function h=%champdat_i_h(i,v,h)
         else
             index=:
         end
-        n=lstsize(i)
+        n = size(i)
         for k=1:n-1
             p=i(k)
             if type(p)==10 then
index 5a00d63..c154c6c 100644 (file)
@@ -21,7 +21,7 @@ function h=%grayplot_i_h(i,v,h)
         else
             index=:
         end
-        n=lstsize(i)
+        n = size(i)
         for k=1:n-1
             p=i(k)
             if type(p)==10 then
index 43be823..4ad4a34 100644 (file)
 function r=%l_n_l(l1,l2)
     //%l_n_l(l1,l2)  : l1<>l2
     //!
-    n1=lstsize(l1)
-    r=n1<>lstsize(l2)
+    n1 = size(l1)
+    r =n1 <> size(l2)
 
     if ~r&n1>0 then
-        r=%f(ones(1,n1))
+        r = %f(ones(1,n1))
         sel=%f(ones(1,n1))
         k1=definedfields(l1)
         k2=definedfields(l2)
index 3ffe43d..f684023 100644 (file)
@@ -85,7 +85,7 @@ function out=%s_i_st(varargin)
             out=out(varargin(1:Ndims))
         end
 
-    elseif lstsize(varargin)==3 & type(varargin(1))==10 then // out.i=in
+    elseif size(varargin)==3 & type(varargin(1))==10 then // out.i=in
         i=varargin(1);
         in=varargin(2);
         out=varargin(3);
index 74eb3d2..5223913 100644 (file)
@@ -22,7 +22,7 @@ function h=%ticks_i_h(i,v,h)
         else
             index=:
         end
-        n=lstsize(i)
+        n = size(i)
         for k=1:n-1
             p=i(k)
             if type(p)==10 then
index 38ee1f0..15f4785 100644 (file)
@@ -47,7 +47,7 @@ function  M=createstruct(index,N)
                 elseif type(index(1))==15
                     // X(p,q[,...]).f=z -> index=list(list(p,q[,...]),f)
                     I=index(1)
-                    Ndims=lstsize(I) //the number of dimensions
+                    Ndims = size(I) //the number of dimensions
 
                     //compute the struct dimensions from max indices values
                     Dims=[];for kDims=1:Ndims, Dims=[Dims,max(I(kDims)) ];end
index f37d044..0afdd15 100644 (file)
@@ -20,9 +20,9 @@ function h=generic_i_h(i,v,h)
         i($+1)=:
     end
 
-    n=lstsize(i)
+    n = size(i)
     hdl=h;hind=[]
-    for k=1:lstsize(i)// walk down in the handle tree
+    for k=1:size(i)// walk down in the handle tree
         p=i(k)
         lasthandle=hdl,
         if type(p)==10 then
index 0553715..67cf132 100644 (file)
@@ -46,7 +46,7 @@ function [model,ok]=build_modelica_block(blklstm,corinvm,cmmat,NiM,NoM,NvM,scs_m
     //## search for
 
     Mblocks = [];
-    for i=1:lstsize(blklstm)
+    for i=1:size(blklstm)
         if type(blklstm(i).sim)==15 then
             if blklstm(i).sim(2)==30004 then
                 o = scs_m(scs_full_path(corinvm(i)))
index edd1ef9..a3e2702 100644 (file)
@@ -1254,7 +1254,7 @@ function [lnksz,lnktyp,inplnk,outlnk,clkptr,cliptr,inpptr,outptr,xptr,zptr,..
         //odstate
         if type(ll.odstate)==15 then
             if ((funtyp(i,1)==5) | (funtyp(i,1)==10005)) then //sciblocks : don't extract
-                if lstsize(ll.odstate)>0 then
+                if size(ll.odstate)>0 then
                     oxd0($+1)=ll.odstate
                     ozptr(i+1)=ozptr(i)+1;
                 else
@@ -1262,7 +1262,7 @@ function [lnksz,lnktyp,inplnk,outlnk,clkptr,cliptr,inpptr,outptr,xptr,zptr,..
                 end
             elseif ((funtyp(i,1)==4)    | (funtyp(i,1)==10004) |...
                 (funtyp(i,1)==2004) | (funtyp(i,1)==12004))  //C blocks : extract
-                ozsz=lstsize(ll.odstate);
+                ozsz = size(ll.odstate);
                 if ozsz>0 then
                     for j=1:ozsz, oxd0($+1)=ll.odstate(j), end;
                     ozptr(i+1)=ozptr(i)+ozsz;
@@ -1300,7 +1300,7 @@ function [lnksz,lnktyp,inplnk,outlnk,clkptr,cliptr,inpptr,outptr,xptr,zptr,..
         //object parameters
         if type(ll.opar)==15 then
             if ((funtyp(i,1)==5) | (funtyp(i,1)==10005)) then //sciblocks : don't extract
-                if lstsize(ll.opar)>0 then
+                if size(ll.opar)>0 then
                     opar($+1)=ll.opar
                     opptr(i+1)=opptr(i)+1;
                 else
@@ -1308,7 +1308,7 @@ function [lnksz,lnktyp,inplnk,outlnk,clkptr,cliptr,inpptr,outptr,xptr,zptr,..
                 end
             elseif ((funtyp(i,1)==4)    | (funtyp(i,1)==10004) |...
                 (funtyp(i,1)==2004) | (funtyp(i,1)==12004)) then //C blocks : extract
-                oparsz=lstsize(ll.opar);
+                oparsz = size(ll.opar);
                 if oparsz>0 then
                     for j=1:oparsz, opar($+1)=ll.opar(j), end;
                     opptr(i+1)=opptr(i)+oparsz;
index fb888b2..82be143 100644 (file)
@@ -128,14 +128,14 @@ function [cpr,ok]=c_pass3(scs_m,cpr)
         //object discrete state
         if type(ll.odstate)==15 then
             if ((funtyp(i,1)==5) | (funtyp(i,1)==10005)) then //sciblocks : don't extract
-                if lstsize(ll.odstate)>0 then
+                if size(ll.odstate)>0 then
                     oxd0($+1)=ll.odstate
                     ozptr=[ozptr;ozptr($)+1];
                 else
                     ozptr=[ozptr;ozptr($)];
                 end
             elseif ((funtyp(i,1)==4) | (funtyp(i,1)==10004) | (funtyp(i,1)==2004))  //C blocks : extract
-                ozsz=lstsize(ll.odstate);
+                ozsz = size(ll.odstate);
                 if ozsz>0 then
                     for j=1:ozsz, oxd0($+1)=ll.odstate(j), end;
                     ozptr=[ozptr;ozptr($)+ozsz];
@@ -169,14 +169,14 @@ function [cpr,ok]=c_pass3(scs_m,cpr)
         //opar
         if type(ll.opar)==15 then
             if ((funtyp(i,1)==5) | (funtyp(i,1)==10005)) then //sciblocks : don't extract
-                if lstsize(ll.opar)>0 then
+                if size(ll.opar)>0 then
                     opar($+1)=ll.opar
                     opptr=[opptr;opptr($)+1];
                 else
                     opptr=[opptr;opptr($)];
                 end
             elseif ((funtyp(i,1)==4) | (funtyp(i,1)==10004) | (funtyp(i,1)==2004)) then //C blocks : extract
-                oparsz=lstsize(ll.opar);
+                oparsz = size(ll.opar);
                 if oparsz>0 then
                     for j=1:oparsz, opar($+1)=ll.opar(j), end;
                     opptr=[opptr;opptr($)+oparsz];
index bf795a6..045de10 100644 (file)
@@ -46,12 +46,12 @@ function ierr = cos2cosf(u,scs_m,count)
     //scicos_params
     tt=[];
     fields=getfield(1,scs_m.props);
-    for i=1:lstsize(scs_m.props)-1
+    for i=1:size(scs_m.props)-1
         field_nam=fields(i+1);
         if field_nam=="title" then field_nam="Title", end
         tt2=sci2exp(getfield(i+1,scs_m.props),lmax);
         tt2(1)=field_nam+"="+tt2(1);
-        if i<>lstsize(scs_m.props)-1 then
+        if i<>size(scs_m.props)-1 then
             tt2($)=tt2($)+",";
         end
         tt=[tt;tt2];
@@ -83,7 +83,7 @@ function ierr = cos2cosf(u,scs_m,count)
 
     t=[];
 
-    for k=1:lstsize(scs_m.objs)
+    for k=1:size(scs_m.objs)
 
         o=scs_m.objs(k)
         if typeof(o)=="Block" then
@@ -106,11 +106,11 @@ function ierr = cos2cosf(u,scs_m,count)
             //scicos_graphics
             tt=[];
             fields=getfield(1,o.graphics);
-            for i=1:lstsize(o.graphics)-1
+            for i=1:size(o.graphics)-1
                 field_nam=fields(i+1);
                 tt2=sci2exp(getfield(i+1,o.graphics),lmax);
                 tt2(1)=field_nam+"="+tt2(1);
-                if i<>lstsize(o.graphics)-1 then
+                if i<>size(o.graphics)-1 then
                     tt2($)=tt2($)+",";
                 end
                 tt=[tt;tt2];
@@ -128,7 +128,7 @@ function ierr = cos2cosf(u,scs_m,count)
             //scicos_model
             tt=[];
             fields=getfield(1,o.model);
-            for i=1:lstsize(o.model)-1
+            for i = 1:size(o.model)-1
                 field_nam=fields(i+1);
                 if field_nam=="rpar"&(o.model.sim=="super"| o.model.sim=="csuper"| o.model.sim(1)=="asuper") then
                     tt2="scs_m_"+string(count+1);
@@ -136,7 +136,7 @@ function ierr = cos2cosf(u,scs_m,count)
                     tt2=sci2exp(getfield(i+1,o.model),lmax);
                 end
                 tt2(1)=field_nam+"="+tt2(1);
-                if i<>lstsize(o.model)-1 then
+                if i <> size(o.model)-1 then
                     tt2($)=tt2($)+",";
                 end
                 tt=[tt;tt2];
@@ -177,11 +177,11 @@ function ierr = cos2cosf(u,scs_m,count)
                 tt=[];
                 txt=[];
                 fields=getfield(1,o);
-                for i=1:lstsize(o)-1
+                for i = 1:size(o)-1
                     field_nam=fields(i+1);
                     tt2=sci2exp(getfield(i+1,o),lmax);
                     tt2(1)=field_nam+"="+tt2(1);
-                    if i<>lstsize(o)-1 then
+                    if i <> size(o)-1 then
                         tt2($)=tt2($)+",";
                     end
                     tt=[tt;tt2];
index 50de35f..fbc52c8 100644 (file)
@@ -54,7 +54,7 @@ function [txt,rpar,ipar] = create_modelica(blklst,corinvm,cmat,NvM,name,scs_m)
         //** mo.parameters have size=2
         //** it only contains parameters
         if np<>0 then
-            if lstsize(mo.parameters)==2 then
+            if size(mo.parameters)==2 then
                 mo.parameters(3)=zeros(1,np)
             end
         end
index c2bc774..a854d1f 100644 (file)
@@ -21,7 +21,7 @@
 
 function scs_m=delete_unconnected(scs_m);
 
-    n = lstsize(scs_m.objs);
+    n = size(scs_m.objs);
 
     if n==0 then
         return
@@ -71,7 +71,7 @@ function scs_m=delete_unconnected(scs_m);
     //suppress right-most deleted elements
     while getfield(1,scs_m.objs($))=="Deleted" then
         scs_m.objs($)=null();
-        if lstsize(scs_m.objs)==0 then
+        if size(scs_m.objs)==0 then
             break
         end
     end
index 34b65b8..a0dac2c 100644 (file)
@@ -39,7 +39,7 @@ function  [%cpr,ok] = do_compile(scs_m)
     timer() ; //** profiling timer
 
     IN=[];OUT=[];
-    for i=1:lstsize(scs_m.objs)
+    for i = 1:size(scs_m.objs)
         if typeof(scs_m.objs(i))=="Block" then
             if scs_m.objs(i).gui=="IN_f" then
                 scs_m.objs(i).gui="INPUTPORT";
index c3dbfd4..a21f393 100644 (file)
@@ -1478,7 +1478,7 @@ function  [ok,XX,alreadyran,flgcdgen,szclkINTemp,freof] = do_compile_superblock4
     funs_save=cpr.sim.funs;
     funtyp_save=cpr.sim.funtyp;
     with_work = zeros(cpr.sim.nblk,1)
-    for i=1:lstsize(cpr.sim.funs)
+    for i=1:size(cpr.sim.funs)
         if part(cpr.sim.funs(i),1:10)=="actionneur" then
             cpr.sim.funs(i) ="bidon"
             cpr.sim.funtyp(i) = 1
@@ -1692,7 +1692,7 @@ function  [ok,XX,alreadyran,flgcdgen,szclkINTemp,freof] = do_compile_superblock4
     maxnin=max(inpptr(2:$)-inpptr(1:$-1))
     maxnout=max(outptr(2:$)-outptr(1:$-1))
     maxdim=[];
-    for i=1:lstsize(cpr.state.outtb)
+    for i=1:size(cpr.state.outtb)
         maxdim=max(size(cpr.state.outtb(i)))
     end
     maxtotal=max([maxnrpar;maxnipar;maxnx;maxnz;maxnin;maxnout;maxdim]);
@@ -2233,8 +2233,8 @@ function make_computational42(filename)
     Indent2=Indent+Indent;
     BigIndent="          ";
 
-    nZ=size(z,"*"); //** index of work in z
-    nO=lstsize(oz); //** index of outtb in oz
+    nZ = size(z,"*"); //** index of work in z
+    nO = size(oz); //** index of outtb in oz
 
     stalone=%f
 
@@ -3382,7 +3382,7 @@ function make_standalone42(filename)
     BigIndent="          ";
 
     work=zeros(nblk,1)
-    Z=[z;zeros(lstsize(outtb),1);work]';
+    Z=[z;zeros(size(outtb),1);work]';
     nX=size(x,"*");
     nztotal=size(z,1);
 
@@ -3574,7 +3574,7 @@ function make_standalone42(filename)
     cformatline("     z_initial_condition={"+...
     strcat(string(z),",")+"};",70)
     cformatline("     outtbptr={"+...
-    strcat(string(zeros(lstsize(outtb),1)),"," )+"};",70)
+    strcat(string(zeros(size(outtb),1)),"," )+"};",70)
     cformatline("     work= {"+...
     strcat(string(work),"," )+"};",70)
     "  */"
@@ -3625,7 +3625,7 @@ function make_standalone42(filename)
 
     //** declaration of oz
     Code_oz = [];
-    for i=1:lstsize(oz)
+    for i=1:size(oz)
         if mat2scs_c_nb(oz(i)) <> 11 then
             Code_oz=[Code_oz;
             cformatline("  "+mat2c_typ(oz(i))+...
@@ -3647,7 +3647,7 @@ function make_standalone42(filename)
 
     //** declaration of outtb
     Code_outtb = [];
-    for i=1:lstsize(outtb)
+    for i=1:size(outtb)
         if mat2scs_c_nb(outtb(i)) <> 11 then
             Code_outtb=[Code_outtb;
             cformatline("  "+mat2c_typ(outtb(i))+...
@@ -3670,7 +3670,7 @@ function make_standalone42(filename)
     end
 
     Code_outtbptr=[];
-    for i=1:lstsize(outtb)
+    for i=1:size(outtb)
         Code_outtbptr=[Code_outtbptr;
         "  "+rdnom+"_block_outtbptr["+...
         string(i-1)+"] = (void *) outtb_"+string(i)+";"];
@@ -3682,7 +3682,7 @@ function make_standalone42(filename)
     ""
     //## affectation of work
     "  /* Get work ptr of blocks */"
-    "  work = (void **)(z+"+string(size(z,"*")+lstsize(outtb))+");"
+    "  work = (void **)(z+"+string(size(z,"*")+size(outtb))+");"
     ""], fd);
 
     //## affection of outtbptr
@@ -4509,7 +4509,7 @@ function txt=make_static_standalone42()
 
     //Alan added opar (27/06/07)
     //*** Object parameters ***//
-    if lstsize(opar)<>0 then
+    if size(opar)<>0 then
         txt=[txt;
         "/* def object parameters */"]
         for i=1:(length(opptr)-1)
index 17b6578..1a872fb 100644 (file)
@@ -89,7 +89,7 @@ function [scs_m,cpr,needcompile,ok]=do_eval(scs_m,cpr,%scicos_context)
     "if funam1 <> [] then, "+..
     "    mputl(tt, funam1); "+..
     "end");
-    %nx=lstsize(scs_m.objs)
+    %nx = size(scs_m.objs)
     %x=scs_m.objs;
     funcprot(%mprt)
     for %kk=1:%nx
index b9edaf4..0b2bcd3 100644 (file)
@@ -22,7 +22,7 @@
 function scs_m_new = do_purge(scs_m)
 
     // suppress deleted elements in a scicos data structure
-    nx = lstsize(scs_m.objs);
+    nx = size(scs_m.objs);
 
     // get index of deleted blocks
     deleted=[];
index 853e866..88ef9fd 100644 (file)
@@ -1033,7 +1033,7 @@ endfunction
 function scs_m_new=do_version272(scs_m)
 
     scs_m_new=scs_m
-    for i=1:lstsize(scs_m.objs)
+    for i=1:size(scs_m.objs)
 
         if typeof(scs_m.objs(i))=="Block" then
             grphic=scs_m.objs(i).graphics
@@ -2116,7 +2116,7 @@ function scs_m_new=do_version27(scs_m)
     if typeof(scs_m)=="diagram" then
         //following code reported into do_version273
         //     scs_m_new=scs_m,
-        //     nlstsize=lstsize(scs_m_new.objs)
+        //     nlstsize= size(scs_m_new.objs)
         //     for k=1:nlstsize
         //       if typeof(scs_m_new.objs(k))=='Link' then
         //  o=scs_m_new.objs(k)
@@ -2148,7 +2148,7 @@ function scs_m_new=do_version27(scs_m)
     end
 
     scs_m_new.objs(1)=mlist("Deleted") // not to change the internal numbering
-    n=lstsize(scs_m)
+    n = size(scs_m)
     back_col=8   //white background
 
     mprintf(".")
@@ -2330,7 +2330,7 @@ function scs_m_new=do_versionxx(scs_m)
     scs_m_new=scicos_diagram()
     scs_m_new.props=scs_m(1)
     scs_m_new.objs(1)=mlist("Deleted") // not to change the internal numbering
-    n=lstsize(scs_m)
+    n = size(scs_m)
     for i=2:n //loop on objects
         o=scs_m(i)
         scs_m_new.objs(i)=o
index 82445ed..6d0a572 100644 (file)
@@ -139,21 +139,21 @@ function [%state0,state,sim,ok]=modipar(newparameters,%state0,state,sim,scs_m,co
                     (type(fun)<>15)) then //old sci blocks or odstatek not a list
                     nek=-(ozptr(kc+1)-ozptr(kc))
                 elseif ((fun(2)==5) | (fun(2)==10005)) then // sciblocks type 5 | 10005
-                    if lstsize(odstatek)>0 then
+                    if size(odstatek)>0 then
                         nek=1-(ozptr(kc+1)-ozptr(kc)) //nombre d'états supplémentaires
                     else
                         nek=-(ozptr(kc+1)-ozptr(kc))
                     end
                 elseif ((fun(2)==4) | (fun(2)==10004) | (fun(2)==2004)) then // C blocks type 4 | 10004
-                    nek=lstsize(odstatek)-(ozptr(kc+1)-ozptr(kc))
+                    nek = size(odstatek)-(ozptr(kc+1)-ozptr(kc))
                 else // other C and sci blocks
                     nek=-(ozptr(kc+1)-ozptr(kc))
                 end
                 sel=ozptr(kc+1):ozptr($)-1
 
                 if nek<>0&sel<>[] then
-                    while lstsize(oz)<max(nek+sel), oz($+1)=[], end
-                    while lstsize(oz0)<max(nek+sel), oz0($+1)=[], end
+                    while size(oz)<max(nek+sel), oz($+1)=[], end
+                    while size(oz0)<max(nek+sel), oz0($+1)=[], end
                     if nek>0 then sel=gsort(sel), end
                     for j=sel
                         oz(j+nek)=oz(j)
@@ -164,12 +164,12 @@ function [%state0,state,sim,ok]=modipar(newparameters,%state0,state,sim,scs_m,co
 
                 if ((type(odstatek)==15) & (type(fun)==15)) then
                     if ((fun(2)==5) | (fun(2)==10005)) then // sciblocks
-                        if lstsize(odstatek)>0 then
+                        if size(odstatek)>0 then
                             oz(ozptr(kc))=odstatek;
                             oz0(ozptr(kc))=odstatek;
                         end
                     elseif ((fun(2)==4) | (fun(2)==10004) | (fun(2)==2004)) then  // C blocks
-                        for j=1:lstsize(odstatek)
+                        for j=1:size(odstatek)
                             oz(ozptr(kc)+j-1)=odstatek(j);
                             oz0(ozptr(kc)+j-1)=odstatek(j);
                         end
@@ -221,30 +221,30 @@ function [%state0,state,sim,ok]=modipar(newparameters,%state0,state,sim,scs_m,co
                     (type(fun)<>15)) then //old sci blocks or odstatek not a list
                     nek=-(opptr(kc+1)-opptr(kc))
                 elseif ((fun(2)==5) | (fun(2)==10005)) then // sciblocks
-                    if lstsize(opark)>0 then
+                    if size(opark)>0 then
                         nek=1-(opptr(kc+1)-opptr(kc)) //nombre de param�tres suppl�mentaires
                     else
                         nek=-(opptr(kc+1)-opptr(kc))
                     end
                 elseif ((fun(2)==4) | (fun(2)==10004) | (fun(2)==2004)) then //C blocks
-                    nek=lstsize(opark)-(opptr(kc+1)-opptr(kc))
+                    nek=size(opark)-(opptr(kc+1)-opptr(kc))
                 else // other C and sci blocks
                     nek=-(opptr(kc+1)-opptr(kc))
                 end
                 sel=opptr(kc+1):opptr($)-1
                 if nek<>0&sel<>[] then
-                    while lstsize(opar)<max(nek+sel), opar($+1)=[], end
+                    while size(opar)<max(nek+sel), opar($+1)=[], end
                     if nek>0 then sel=gsort(sel), end
                     for j=sel, opar(j+nek)=opar(j); end
                 end
                 opptr(kc+1:$)=opptr(kc+1:$)+nek;
                 if ((type(opark)==15) & (type(fun)==15)) then
                     if ((fun(2)==5) | (fun(2)==10005)) then // sciblocks
-                        if lstsize(opark)>0 then
+                        if size(opark)>0 then
                             opar(opptr(kc))=opark;
                         end
                     elseif ((fun(2)==4) | (fun(2)==10004) | (fun(2)==2004)) then //C blocks
-                        for j=1:lstsize(opark), opar(opptr(kc)+j-1)=opark(j), end
+                        for j=1:size(opark), opar(opptr(kc)+j-1)=opark(j), end
                     end
                 end
                 //## rebuild opar list if nek < 0
index 0a7ad3c..ffcee3e 100644 (file)
@@ -122,7 +122,7 @@ endfunction
 function [Ts,corinv,bllst,indout,ok,scs_m,flgcdgen,freof]=update_diag(scs_m,corinv,Ts,frequ,offset,freqdiv,bllst,den,flg,indout,flgcdgen)
     //modification to support double
     ok=%t
-    n=lstsize(scs_m.objs)
+    n = size(scs_m.objs)
 
     // when the function is called by the code generator we add an input event to the diagram
     // the major clock will be put outside the superblock. it will be explicitly drawn.
@@ -236,7 +236,7 @@ function [Ts,bllst,corinv,indout,ok]=s_clk2(MAT,Ts,bllst,corinv,scs_m,indout)
     [m,den,off,count,m1,fir,frequ,offset,ok]=mfrequ_clk(frequ,offset);
     if ~ok then return;end
     mn=(2**size(m1,"*"))-1;//number of event outputs.
-    n=lstsize(scs_m.objs);
+    n = size(scs_m.objs);
     bllst($+1)=scicos_model(sim=list("m_frequ",4),in=[],in2=[],intyp=1,out=[],out2=[],outtyp=1,..
     evtin=1,evtout=ones(mn,1),state=[],dstate=[],odstate=list(),rpar=[],ipar=[],..
     opar=list(m,double(den),off,count),blocktype="d",firing=fir,dep_ut=[%f,%f],..
index bfc1af3..8501c0f 100644 (file)
@@ -81,7 +81,7 @@ function  [cor,corinv,links_table,cur_fictitious,sco_mat,ok, IN, OUT, EIN, EOUT]
     block_goto=["GOTO","CLKGOTO","GOTOMO"]
     block_from=["FROM","CLKFROM","FROMMO"]
     block_tag=["GotoTagVisibility","CLKGotoTagVisibility","GotoTagVisibilityMO"]
-    n=lstsize(scs_m.objs) //number of "objects" in the data structure
+    n = size(scs_m.objs) //number of "objects" in the data structure
     //-------------- initialize outputs --------------
     nb=0;
     links_table=[]; //
index aee8477..3d1b53c 100644 (file)
@@ -62,7 +62,7 @@ function [model,...
     "vart=1"
     "if type(var#)<>15 then ierr=1, resume, end"
     "if var#<>list() then"
-    "  if lstsize(var#)<>2 then ierr=2, resume, end"
+    "  if size(var#)<>2 then ierr=2, resume, end"
     "  for i=1:2"
     "    if ~(type(var#(i))==1|type(var#(i))==8) then ierr=2+i, resume, end"
     "  end"
index 7388f60..233f5a3 100644 (file)
@@ -68,7 +68,7 @@ function scs_m_new = update_scs_m(scs_m,version)
             //******************** objs *******************//
         case "objs" then
 
-            for j=1:lstsize(scs_m.objs) //loop on objects
+            for j = 1:size(scs_m.objs) //loop on objects
 
                 o=scs_m.objs(j);
 
index cc823ff..01c8ebc 100644 (file)
@@ -565,7 +565,7 @@ assert_checkequal(scs_m.objs(4), DeletedObj);
 // Effectively empty the diagram
 for i=3:-1:0
     scs_m.objs($) = null();
-    assert_checkequal(lstsize(scs_m.objs), i);
+    assert_checkequal(size(scs_m.objs), i);
 end
 Xcos debug:   propertyUpdated( 1 , DIAGRAM , CHILDREN ) : SUCCESS
 Xcos debug:   propertyUpdated( 1 , DIAGRAM , CHILDREN ) : SUCCESS
@@ -1389,7 +1389,7 @@ Xcos trace:   propertyUpdated( 117 , BLOCK , EVENT_INPUTS ) : NO_CHANGES
 Xcos trace:   propertyUpdated( 117 , BLOCK , EVENT_OUTPUTS ) : NO_CHANGES
 Xcos info:    objectDeleted( 120 , PORT )
 Xcos info:    objectDeleted( 117 , BLOCK )
-assert_checkequal(lstsize(scs_m.objs), 4);
+assert_checkequal(size(scs_m.objs), 4);
 Xcos trace:   objectReferenced( 122 , BLOCK ) : 1
 Xcos trace:   objectReferenced( 126 , LINK ) : 1
 Xcos trace:   objectReferenced( 127 , BLOCK ) : 1
index fac67d7..79f3acc 100644 (file)
@@ -48,7 +48,7 @@ assert_checkequal(scs_m.objs(4), DeletedObj);
 // Effectively empty the diagram
 for i=3:-1:0
     scs_m.objs($) = null();
-    assert_checkequal(lstsize(scs_m.objs), i);
+    assert_checkequal(size(scs_m.objs), i);
 end
 
 // Check that all the model items are freed
@@ -78,7 +78,7 @@ assert_checkequal(scs_m.objs(3), DeletedObj);
 
 // Effectively remove the object
 scs_m.objs(3) = null();
-assert_checkequal(lstsize(scs_m.objs), 4);
+assert_checkequal(size(scs_m.objs), 4);
 
 // The remaining diagram is not expected to stay coherent, the user should fix it by hand
 scs_m.objs(4).from = [3 1 0];
index c3aa445..cd02a0b 100644 (file)
@@ -280,14 +280,14 @@ function [x,y,typ]=MBLOCK(job,arg1,arg2)
                 Tparam_sz=size(Tparam_lab,"*") //numbers of labels
 
                 //adjust size of lab_2 according to size of Tparam
-                if Tparam_sz>lstsize(lab_2) then
-                    for i=1:(Tparam_sz-lstsize(lab_2))
+                if Tparam_sz > size(lab_2) then
+                    for i=1:(Tparam_sz - size(lab_2))
                         lab_2($+1)="0"
                     end
-                elseif Tparam_sz<lstsize(lab_2) then
+                elseif Tparam_sz < size(lab_2) then
                     lab_2_tmp=list()
                     if Tparam_sz<>0 then //if param
-                        for i=1:(lstsize(lab_2)-Tparam_sz)
+                        for i=1:(size(lab_2)-Tparam_sz)
                             lab_2_tmp(i)=lab_2(i)
                         end
                     end
@@ -374,7 +374,7 @@ function [x,y,typ]=MBLOCK(job,arg1,arg2)
                 //------------------
                 //model.rpar=paramv;
                 model.rpar=[]
-                for i=1:lstsize(paramv)
+                for i=1:size(paramv)
                     model.rpar=[model.rpar;
                     paramv(i)(:)]//value
                 end
@@ -388,7 +388,7 @@ function [x,y,typ]=MBLOCK(job,arg1,arg2)
                 exprs.paramv=list();
                 if Tparam_sz<>0 then //if param
                     if type(lab_2)==15 then //for eval
-                        for i=1:lstsize(lab_2)
+                        for i=1:size(lab_2)
                             exprs.paramv(i)=lab_2(i);//string
                         end
                     else
@@ -444,7 +444,7 @@ function [x,y,typ]=MBLOCK(job,arg1,arg2)
         model.dep_ut=[%f %t]
         //model.rpar=paramv;
         model.rpar=[]
-        for i=1:lstsize(paramv)
+        for i=1:size(paramv)
             model.rpar=[model.rpar;
             paramv(i)(:)]
         end
index d54f198..6ec3d4b 100644 (file)
@@ -280,11 +280,11 @@ function [x,y,typ]=MPBLOCK(job,arg1,arg2)
                 Tparam_sz=size(Tparam_lab,"*") //numbers of labels
 
                 //adjust size of lab_2 according to size of Tparam
-                if Tparam_sz>lstsize(lab_2) then
-                    for i=1:(Tparam_sz-lstsize(lab_2))
+                if Tparam_sz > size(lab_2) then
+                    for i=1:(Tparam_sz-size(lab_2))
                         lab_2($+1)="0"
                     end
-                elseif Tparam_sz<lstsize(lab_2) then
+                elseif Tparam_sz < size(lab_2) then
                     lab_2_tmp=list()
                     if Tparam_sz<>0 then //if param
                         for i=1:Tparam_sz
@@ -363,7 +363,7 @@ function [x,y,typ]=MPBLOCK(job,arg1,arg2)
                 //------------------
                 //model.rpar=paramv;
                 model.rpar=[]
-                for i=1:lstsize(paramv)
+                for i=1:size(paramv)
                     model.rpar=[model.rpar;
                     double(paramv(i)(:))]//value
                 end
@@ -378,7 +378,7 @@ function [x,y,typ]=MPBLOCK(job,arg1,arg2)
                 exprs.paramv=list();
                 if Tparam_sz<>0 then //if param
                     if type(lab_2)==15 then //for eval
-                        for i=1:lstsize(lab_2)
+                        for i=1:size(lab_2)
                             exprs.paramv(i)=lab_2(i);//string
                         end
                     else
@@ -433,7 +433,7 @@ function [x,y,typ]=MPBLOCK(job,arg1,arg2)
         model.dep_ut=[%t %t]
         //model.rpar=paramv;
         model.rpar=[]
-        for i=1:lstsize(paramv)
+        for i=1:size(paramv)
             model.rpar=[model.rpar;
             paramv(i)(:)]
         end
index 25f39f4..f2f9960 100644 (file)
@@ -93,6 +93,7 @@ std::unordered_map<std::wstring, std::wstring> DeprecatedChecker::initDep()
     // TODO: get this list from a conf file
     std::unordered_map<std::wstring, std::wstring> map;
     // Scilab 6.0.x => 6.1.0
+    map.emplace(L"lstsize", L"size");
     map.emplace(L"nanmin", L"min");
     map.emplace(L"nanmax", L"max");
     map.emplace(L"square", L"replot");
index cfa802e..855f711 100644 (file)
@@ -146,14 +146,14 @@ function [%cpr, ok] = xcos_simulate(scs_m, needcompile)
         issequal = %f
     else
         //** test typeof outtb element
-        for i=1:lstsize(%state0_n.outtb)
+        for i = 1:size(%state0_n.outtb)
             if typeof(%state0_n.outtb(i))<>typeof(%state0.outtb(i))
                 issequal = %f
                 break
             end
         end
         //** test typeof oz element
-        for i=1:lstsize(%state0_n.oz)
+        for i = 1:size(%state0_n.oz)
             if typeof(%state0_n.oz(i))<>typeof(%state0.oz(i))
                 issequal = %f
                 break