Permalink
Browse files

detail a bit more our changes about the introduction of the SOD format

Change-Id: Ib72cdd48db503bfcc1d0b717c86fabbba28aaada
  • Loading branch information...
1 parent fa3bee5 commit 9815e1357fc8895e9a39ed2cd0014e556bee453b @sylvestre sylvestre committed with Vincent COUVERT Apr 5, 2012
View
@@ -1,17 +1,23 @@
- Changes between version 5.4.0-alpha-1 and 5.4.0-alpha-2 of Scilab
- =================================================================
+ Changes between version 5.4.0-alpha-1 and 5.4.0-beta-1 of Scilab
+ ================================================================
Scilab
======
+* save/load functions can now export/import Scilab data to SOD format:
+ - Scilab data are now saved and loaded using a standard, HDF5-based, documented,
+ and fully tested: Scilab Open Data format (SOD).
+ - Graphic handles can be saved with the SOD format.
+ - 'save' writes data to HDF5 format when using new calling sequence
+ save(filename.sod, "a", "b", "c"). This format is Scilab 6 compatible.
+ - 'save' displays a message when using old calling sequence
+ save(filename, a, b, c) and writes data in old Scilab binary format.
+ The previous format will not be supported by Scilab 6.
+
* Update the default size of the Scilab stack to 100 M elements (instead of 50M).
See stacksize for more information.
-* save/load functions can now export/import Scilab data to HDF5 format:
- - Graphic handles can be saved as HDF5 data
- - 'save' displays a message when using old calling sequence save(filename, a, b, c) and writes data in old Scilab binary format. This format will not be readable by Scilab 6 family.
- - 'save' writes data to HDF5 format when using new calling sequence save(filename, "a", "b", "c"). This format is Scilab 6 compatible.
Scilab Desktop
@@ -28,7 +28,7 @@ <h3 class="title">What's new in Scilab 5.4.0 beta 1?</h3>
<li><a href="browsehistory.html">History browser</a> is now faster and more efficient.</li>
</ul>
<p class="para">XML access from Scilab has never been easier thanks to a new dedicated module to read and write XML files named XML.</p>
- <p class="para">Available in a future alpha or beta version of Scilab 5.4.0, an internal improvement of Scilab graphics will provide faster and better 2-D and 3-D plotting.<br/>A future development release will also introduce Scilab preferences (unique interface to configure Scilab and its modules).</p>
+ <p class="para">Available in a future beta version of Scilab 5.4.0, an internal improvement of Scilab graphics will provide faster and better 2-D and 3-D plotting.<br/>A future development release will also introduce Scilab preferences (unique interface to configure Scilab and its modules).</p>
<p class="para">
<a href="http://www.scilab.org/products/scilab/download/5.4.0-beta-1/Changes">See all changes in Scilab 5.4.0 beta 1</a>
</p>
@@ -28,7 +28,7 @@ <h3 class="title">Nouveautés de Scilab 5.4.0 beta 1</h3>
<li><a href="browsehistory.html">L'historique des commandes</a> est plus rapide et plus performant.</li>
</ul>
<p class="para">L'accès à des données XML depuis Scilab n'a jamais été aussi facile grâce à un nouveau module dédié (XML) qui permet de lire et écrire des fichiers XML.</p>
- <p class="para">Des fonctionnalités graphiques 2D et 3D plus rapides et plus performantes, la gestion des préférences Scilab (une interface unique pour configurer Scilab et ses modules) seront bientôt disponibles dans une future version 5.4.0 beta ou bêta.</p>
+ <p class="para">Des fonctionnalités graphiques 2D et 3D plus rapides et plus performantes, la gestion des préférences Scilab (une interface unique pour configurer Scilab et ses modules) seront bientôt disponibles dans une future version 5.4.0 beta.</p>
<p class="para">
<a href="http://www.scilab.org/products/scilab/download/5.4.0-beta-1/Changes">Consulter tous les changements intégrés à Scilab 5.4.0 beta 1 (anglais)</a>
</p>
@@ -59,9 +59,6 @@
variables, the corresponding <link linkend="graphics_entities">graphics_entities</link> are drawn.
</para>
<para>
- Since Scilab 5.0, all <link linkend="uimenu">uimenu</link> or <link linkend="uicontrol">uicontrol</link> handles are also drawn.
- </para>
- <para>
<literal>load(filename)</literal> loads the variables saved in file
given by its path <literal>filename</literal>.
</para>
@@ -74,9 +71,8 @@
<literal>load(fd,'x','y')</literal> loads only variables
<literal>x,y</literal>.
</para>
- <para>Even if the binary file format has changed with 2.5 version of
- Scilab, <literal>load(filename,...)</literal> is able to read old format
- files.
+ <para>
+ The change of format between the family 5 and 6 of Scilab has been decided because the 5 format is undocumented, not specified and hard to read. SOD (Scilab 6 default format) is fully documented and easy to read through HDF5 libraries or applications.
</para>
<para>Note that the written file is portable to other operating systems
and architectures (little and big endian).
@@ -85,11 +81,20 @@
<refsection>
<title>Examples</title>
<programlisting role="example"><![CDATA[
+// Binary format readable up to Scilab 5 family
a=eye(2,2);b=ones(a);
save('vals.dat',a,b);
clear a
clear b
load('vals.dat','a','b');
+
+// Binary format readable by Scilab 5.4.X and Scilab 6 family
+a=eye(2,2);b=ones(a);
+save("val.sod", "a", "b");
+clear a
+clear b
+load("val.sod", "a", "b");
+
]]></programlisting>
</refsection>
<refsection role="see also">
@@ -115,4 +120,26 @@ load('vals.dat','a','b');
</member>
</simplelist>
</refsection>
+ <refsection>
+ <title>History</title>
+ <revhistory>
+ <revision>
+ <revnumber>5.0.0</revnumber>
+ <revremark>
+ All <link linkend="uimenu">uimenu</link> or <link linkend="uicontrol">uicontrol</link> handles are also loaded by this function.
+ </revremark>
+ </revision>
+ <revision>
+ <revnumber>5.4.0</revnumber>
+ <revdescription>
+ <itemizedlist>
+ <listitem>
+ The load function is able to handle both Scilab 5 and SOD (Scilab 6 format) by default.
+ </listitem>
+ <listitem>The Scilab 5.X format is deprecated and will be removed with Scilab 6.</listitem>
+ </itemizedlist>
+ </revdescription>
+ </revision>
+ </revhistory>
+ </refsection>
</refentry>
@@ -73,7 +73,10 @@
<literal>save(filename,x,y)</literal> or <literal>save(fd,x,y)</literal> (with <literal>x</literal> and <literal>y</literal> variables of your environment) saves only named variables <literal>x</literal> and <literal>y</literal>.
</para>
<para>
- <literal>save(filename,"x","y")</literal> (with <literal>"x"</literal> and <literal>"y"</literal> names of variables of your environment) will save your data in HDF5, format that will be readable by Scilab 6 family.
+ <literal>save(filename,"x","y")</literal> (with <literal>"x"</literal> and <literal>"y"</literal> names of variables of your environment) will save your data using the SOD (Scilab Open Data) format (based on HDF5), format that will be readable by Scilab 6 family.
+ </para>
+ <para>
+ The change of format between the family 5 and 6 of Scilab has been decided because the 5 format is undocumented, not specified and hard to read. SOD (Scilab 6 default format) is fully documented and easy to read through HDF5 libraries or applications.
</para>
<para>
Saved variables can be reloaded by the
@@ -112,10 +115,10 @@ mclose(fd)
// Binary format readable by Scilab 5.4.X and Scilab 6 family
a=eye(2,2);b=ones(a);
-save("val.h5", "a", "b");
+save("val.sod", "a", "b");
clear a
clear b
-load("val.dat", "a", "b");
+load("val.sod", "a", "b");
]]></programlisting>
</refsection>
<refsection role="see also">
@@ -146,7 +149,12 @@ load("val.dat", "a", "b");
</revision>
<revision>
<revnumber>5.4.0</revnumber>
- <revremark>When called with variables names (character string) as input, variables are saved in HDF5 format, format that will be readable by Scilab 6 family.</revremark>
+ <revdescription>
+ <itemizedlist>
+ <listitem>When called with variables names (character string) as input, variables are saved in SOD format, format that will be readable by Scilab 6 family.</listitem>
+ <listitem>The Scilab 5.X format is deprecated and will be removed with Scilab 6.</listitem>
+ </itemizedlist>
+ </revdescription>
</revision>
</revhistory>
</refsection>
@@ -132,8 +132,9 @@ int sci_save(char *fname, unsigned long fname_len)
{
if (getWarningMode())
{
- sciprint(_("WARNING: your data will be saved in a format that Scilab 6 family will not load.\n"));
- sciprint(_("WARNING: please use new 'save' syntax using variables names to be able to import your data in Scilab 6 and more.\n"));
+ sciprint(_("WARNING: Scilab 6 will not support the file format used.\n"));
+ sciprint(_("WARNING: Please quote the variable declaration. Example, save('myData.sod',a) becomes save('myData.sod','a').\n"));
+ sciprint(_("WARNING: See help('save') for the rational.\n"));
}
C2F(intsave)();
}

0 comments on commit 9815e13

Please sign in to comment.