<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<div class="moz-cite-prefix">Le 15/02/2022 à 19:03, Jean-Yves
Baudais a écrit :<br>
</div>
<blockquote type="cite"
cite="mid:2079744801.126126.1644948214265.JavaMail.zimbra@insa-rennes.fr">
<blockquote type="cite">
<pre class="moz-quote-pre" wrap="">--> clear(string(mylib)(2:$))
</pre>
</blockquote>
<pre class="moz-quote-pre" wrap="">
Thanks! It does what I expected.
</pre>
<blockquote type="cite">
<pre class="moz-quote-pre" wrap="">Should we actually clear also macros belonging to the library, in the default
unloaded.sce script?
There is currently an explicit warning in comment: " This does not unregister
its macros"
I think it would be cleaner. But there may be some reasons to not having done
it...
</pre>
</blockquote>
<pre class="moz-quote-pre" wrap="">
For my Scilab understanding, what are the reasons?</pre>
</blockquote>
<p>I don't know. May be none.</p>
To me, there is a bunch of questions / issues about this
unloader.sce and the ~/etc/module.quit scripts.<br>
<p>The default unloader.sce is generated for instance by
tbx_make(..) <br>
</p>
<ul>
<li>If the module to unload is an autoloaded ATOMS module, its
library is protected. Then trying to clear it yields an expected
error.<br>
The default unloader.sce does not take this into account. Yet,
it should avoid or handle the error without stopping.<br>
<br>
</li>
<li>unloader.sce should clear loaded functions of the library, as
you suggest.<br>
Indeed, if it's not wished, it is simple to comment the line in
the final version.<br>
Otherwise, if you have asked how to do, it's that the syntax is
not trivial to find.<br>
<br>
</li>
<li>atomsQuit() : the documentation (and code) of this function
are prone to discussion:</li>
<ol>
<li>its page says that it executes .quit files of all loaded
ATOMS modules, while it calls their unloader.sce script<br>
</li>
<li>its page says "<i>This function is called by
SCI/etc/scilab.quit</i>". If it is its only usage, then it's
an internal, and it should not be documented. </li>
<li>According to its code: if the autoloading mode of the ATOMS
system is OFF, then atomsQuit() does nothing! That's strange.
This could mean that it is definitely not aimed to be used out
of the automatic Scilab startup.</li>
<li>It can't be used to quit some given modules. Only to quit
all loaded modules. So..</li>
<li>Proposals:</li>
</ol>
<ul>
<ul>
<li>Either we keep atomsQuit() as is, and undocument it to
make it as an internal function</li>
<li>Or we remove the condition (3), and we add an input
argument = vector of modules name to quit. <br>
</li>
</ul>
</ul>
</ul>
<p>Any comments?</p>
<p>Samuel<br>
</p>
</body>
</html>