Le 15/02/2022 à 19:03, Jean-Yves Baudais a écrit :
--> clear(string(mylib)(2:$))
Thanks! It does what I expected.

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...
For my Scilab understanding, what are the reasons?

I don't know. May be none.

To me, there is a bunch of questions / issues about this unloader.sce and the ~/etc/module.quit scripts.

The default unloader.sce is generated for instance by tbx_make(..)

 * If the module to unload is an autoloaded ATOMS module, its library
   is protected. Then trying to clear it yields an expected error.
   The default unloader.sce does not take this into account. Yet, it
   should avoid or handle the error without stopping.

 * unloader.sce should clear loaded functions of the library, as you
   suggest.
   Indeed, if it's not wished, it is simple to comment the line in the
   final version.
   Otherwise, if you have asked how to do, it's that the syntax is not
   trivial to find.

 * atomsQuit() : the documentation (and code) of this function are
   prone to discussion:
    1. its page says that it executes .quit files of all loaded ATOMS
       modules, while it calls their unloader.sce script
    2. its page says "/This function is called by
       SCI/etc/scilab.quit/". If it is its only usage, then it's an
       internal, and it should not be documented.
    3. 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.
    4. It can't be used to quit some given modules. Only to quit all
       loaded modules. So..
    5. Proposals:
         + Either we keep atomsQuit() as is, and undocument it to make
           it as an internal function
         + Or we remove the condition (3), and we add an input argument
           = vector of modules name to quit.

Any comments?

Samuel
_______________________________________________
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users

Reply via email to