[Scilab-users] SCILAB Equivalent of addpath function
Samuel Gougeon
sgougeon at free.fr
Thu May 30 12:18:11 CEST 2019
Le 30/05/2019 à 11:19, Samuel Enibe a écrit :
> Thank you very much for your quick response.
>
> In using SCILAB, I create a folder for a given class of problems. The
> user-defined functions for the problem class are stored in the
> folder. I use the SCILAB function *genlib to* create a functions
> library for the user-defined functions in the folder..
>
> On startup of SCILAB, I would have to run *genlib* again or*lib* to
> make those user-defined functions available for use.
>
> Is there a way of telling SCILAB to search a given folder or folders
> for user-defined functions? In this way, I would not have to run*lib
> *or *genlib* during each SCILAB session.
Why don't you load your custom libraries within your scilab.ini or
.scilab startup file? load() can be used (more safely than lib()) to do so.
However, this way won't prevent them from being cleared by the first
"clear" (all) statement in the console (but this is the same for ATOMS
modules loaded during the session).
To answer your question: As far as i know, no, there is presently no
native mechanism looking for libraries in a series of paths, to load on
the fly, or looking for a series of function definitions.sci to execute
on the fly.
But it can be tentatively implemented by using the %onprompt
<https://help.scilab.org/docs/current/en_US/percentonprompt.html>
mechanism. "--> uman %onpromt @
<http://mailinglists.scilab.org/path-tp3416444p3417057.html>" will tell
you more about it.
Best regards
Samuel Gougeon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20190530/b019f33f/attachment.htm>
More information about the users
mailing list