[scilab-Users] Automatic function loading

Vishwanath Rao gadepall at yahoo.com
Mon Dec 6 13:40:23 CET 2010


I did the following:

1.  genlib('comm','~/Downloads/scilab-5.2.2/comm')  This creates the .bin files 
for the functions in the comm directory and a lib file.
          2.  Loaded the  lib file  in 
the ~/Downloads/scilab-5.2.2/share/scilab/etc/scilab.start by inserting the 
command
load("~/Downloads/scilab-5.2.2/comm/lib");
before the 

// Protect variable previously defined  ================================
predef("all");
lines.  

predef then prevents the functions in the comm library from
being cleared and I can use the comm directory as a kind of toolbox 
 thanks,
Vishwanath.





________________________________
From: Mathieu Dubois <mathieu.dubois at limsi.fr>
To: users at lists.scilab.org
Sent: Mon, 6 December, 2010 17:25:30
Subject: Re: [scilab-Users] Automatic function loading

Hello,
On 12/06/2010 12:34 PM, Vishwanath Rao wrote: 
I did the following
>
>
>1.  opened the file ~/.Scilab/scilab-5.2.2/.scilab
>2.  getd('~/Downloads/scilab-5.2.2/comm')
>
>
>This works, but the clear command clears my functions and I'm not able to use 
>them anymore.  And I do need to use the clear command if I'm going to run a 
>script regularly.
The simple solution is to write getd after clean.

You may have a look at predef which is used to protect variables (I have never 
used it).


>
>Vishwanath.
>
> 
>
>
>
>
>
>
________________________________
From: Allan CORNET <allan.cornet at scilab.org>
>To: users at lists.scilab.org
>Sent: Mon, 6 December, 2010 16:21:51
>Subject: RE: [scilab-Users] Automatic function loading
>
> 
>Hi,
> 
>You can create a startup file. see help startup in scilab
> 
>And add in this file a call to getd (See help getd)
> 
>Allan
> 
> 
>De :Vishwanath Rao [mailto:gadepall at yahoo.com] 
>Envoyé : lundi 6 décembre 2010 11:47
>À : users at lists.scilab.org
>Objet : [scilab-Users] Automatic function loading
> 
>Hi,
>  I'm using Scilab 5.2.2 on Ubuntu Lucid.
> 
>   I have defined the functions qfunc.sci and randsrc.sci in the directory 
>~/Downloads/scilab-5.2.2/comm and load them through the command 
> 
>genlib('comm','~/Downloads/scilab-5.2.2/comm')
> 
>in my scilab script test.sce.  While this works, I want the functions from my 
>'comm' directory to be available permanently without having to use genlib each 
>time.  Is there a simple way to do this?  The toolbox creation method seems too 
>complicated to me right now.
> 
>Vishwanath.
> 
> 
> 
> 
>



      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20101206/76c572d7/attachment.htm>


More information about the users mailing list