<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:'times new roman', 'new york', times, serif;font-size:12pt"><div></div><div><meta http-equiv="content-type" content="text/html; charset=utf-8">I did the following:<br><blockquote type="cite"><div style="font-family: times, serif; font-size: 12pt; "><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "><div class="WordSection1"><div><div><p class="MsoNormal" style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: serif; "><span style="color: red; ">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.</span></p></div></div></div></div></div></div></blockquote><p class="MsoNormal"
 style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: serif; "><div style="font-family: times, serif; font-size: 12pt; "><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "><div class="WordSection1"><div><div><p class="MsoNormal" style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: serif; "><span style="color: red; ">          2.  Loaded the </span><font class="Apple-style-span" color="#FF0000"> lib file  in the </font><span class="Apple-style-span" style="color: rgb(255, 0, 0); ">~/Downloads/scilab-5.2.2/share/scilab/etc/scilab.start </span><span class="Apple-style-span" style="color: rgb(255, 0, 0); ">by inserting the command</span></p><p
 class="MsoNormal" style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; "><font class="Apple-style-span" color="#FF0000">load("~/Downloads/scilab-5.2.2/comm/lib");</font></p><p class="MsoNormal" style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; "><font class="Apple-style-span" color="#FF0000">before the </font></p><p class="MsoNormal" style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; "><font class="Apple-style-span" color="#FF0000"><br></font></p><p class="MsoNormal" style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; "><font class="Apple-style-span" color="#FF0000">// Protect variable previously defined  ================================</font></p><p class="MsoNormal" style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; "><font class="Apple-style-span"
 color="#FF0000">predef("all");</font></p><p class="MsoNormal" style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; "><font class="Apple-style-span" color="#FF0000">lines.  </font></p><p class="MsoNormal" style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; "><font class="Apple-style-span" color="#FF0000"><br></font></p><p class="MsoNormal" style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; "><font class="Apple-style-span" color="#FF0000">predef then prevents the functions in the comm library from</font></p><p class="MsoNormal" style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; "><font class="Apple-style-span" color="#FF0000">being cleared and I can use the comm directory as a kind of toolbox </font></p></div></div></div></div></div></div></p><p class="MsoNormal" style="margin-top: 0cm; margin-right: 0cm;
 margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: serif; "><div style="font-family: times, serif; font-size: 12pt; "><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "><div class="WordSection1"><div><div><p class="MsoNormal" style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: serif; "><span style="color: red; "><br></span></p></div></div></div></div></div></div></p> </div>thanks,<div>Vishwanath.<br><div><br></div><div style="font-family:times new roman, new york, times, serif;font-size:12pt"><br><div style="font-family:times new roman, new york, times, serif;font-size:12pt"><font size="2" face="Tahoma"><hr size="1"><b><span style="font-weight: bold;">From:</span></b> Mathieu Dubois <mathieu.dubois@limsi.fr><br><b><span
 style="font-weight: bold;">To:</span></b> users@lists.scilab.org<br><b><span style="font-weight: bold;">Sent:</span></b> Mon, 6 December, 2010 17:25:30<br><b><span style="font-weight: bold;">Subject:</span></b> Re: [scilab-Users] Automatic function loading<br></font><br>



  


Hello,<br>
On 12/06/2010 12:34 PM, Vishwanath Rao wrote:
<blockquote type="cite">
  
  <div style="font-family:times, serif;font-size:12pt;">
  <div>I did the following</div>
  <div><br>
  </div>
  <div>1.  opened the file ~/.Scilab/scilab-5.2.2/.scilab</div>
  <div>2.  getd('~/Downloads/scilab-5.2.2/comm')</div>
  <div><br>
  </div>
  <div>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.</div>
  </div>
</blockquote>
The simple solution is to write getd after clean.<br>
<br>
You may have a look at predef which is used to protect variables (I
have never used it).<br>
<blockquote type="cite">
  <div style="font-family:times, serif;font-size:12pt;">
  <div><br>
  </div>
  <div>Vishwanath.</div>
  <div><br>
 </div>
  <br>
  <div><br>
  </div>
  <div style="font-family:times new roman, new york, times, serif;font-size:12pt;"><br>
  <div style="font-family:times new roman, new york, times, serif;font-size:12pt;"><font face="Tahoma" size="2">
  <hr size="1"><b><span style="font-weight:bold;">From:</span></b>
Allan CORNET <a rel="nofollow" class="moz-txt-link-rfc2396E" ymailto="mailto:allan.cornet@scilab.org" target="_blank" href="mailto:allan.cornet@scilab.org"><allan.cornet@scilab.org></a><br>
  <b><span style="font-weight:bold;">To:</span></b>
<a rel="nofollow" class="moz-txt-link-abbreviated" ymailto="mailto:users@lists.scilab.org" target="_blank" href="mailto:users@lists.scilab.org">users@lists.scilab.org</a><br>
  <b><span style="font-weight:bold;">Sent:</span></b> Mon, 6 December,
2010 16:21:51<br>
  <b><span style="font-weight:bold;">Subject:</span></b> RE:
[scilab-Users] Automatic function loading<br>
  </font><br>
  <style><!--

filtered {font-family:"Cambria Math";panose-1:2 4 5 3 5 4 6 3 2 4;}
filtered {font-family:Calibri;panose-1:2 15 5 2 2 2 4 3 2 4;}
filtered {font-family:Tahoma;panose-1:2 11 6 4 3 5 4 4 2 4;}

p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;margin-bottom:.0001pt;font-size:12.0pt;font-family:"serif";}
a:link, span.MsoHyperlink
        {color:blue;text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;text-decoration:underline;}
span.EmailStyle17
        {font-family:"sans-serif";color:#1F497D;}
.MsoChpDefault
        {font-size:10.0pt;}
filtered {margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
        {}
--></style>
  <div class="WordSection1">
  <p class="MsoNormal"><span style="font-size:11pt;color:rgb(31, 73, 125);">Hi,</span></p>
  <p class="MsoNormal"><span style="font-size:11pt;color:rgb(31, 73, 125);">
 </span></p>
  <p class="MsoNormal"><span style="font-size:11pt;color:rgb(31, 73, 125);">You
can create a startup file. see help startup in scilab</span></p>
  <p class="MsoNormal"><span style="font-size:11pt;color:rgb(31, 73, 125);">
 </span></p>
  <p class="MsoNormal"><span style="font-size:11pt;color:rgb(31, 73, 125);">And
add in this file a call to getd (See help getd)</span></p>
  <p class="MsoNormal"><span style="font-size:11pt;color:rgb(31, 73, 125);">
 </span></p>
  <p class="MsoNormal"><span style="font-size:11pt;color:rgb(31, 73, 125);">Allan</span></p>
  <p class="MsoNormal"><span style="font-size:11pt;color:rgb(31, 73, 125);">
 </span></p>
  <p class="MsoNormal"><span style="font-size:11pt;color:rgb(31, 73, 125);">
 </span></p>
  <div>
  <div style="border-style:solid none none;border-color:rgb(181, 196, 223);border-width:1pt medium medium;padding:3pt 0cm 0cm;">
  <p class="MsoNormal"><b><span style="font-size:10pt;">De :</span></b><span style="font-size:10pt;"> Vishwanath Rao
[<a rel="nofollow" class="moz-txt-link-freetext" ymailto="mailto:gadepall@yahoo.com" target="_blank" href="mailto:gadepall@yahoo.com">mailto:gadepall@yahoo.com</a>] <br>
  <b>Envoyé :</b> lundi 6 décembre 2010 11:47<br>
  <b>À :</b> <a rel="nofollow" class="moz-txt-link-abbreviated" ymailto="mailto:users@lists.scilab.org" target="_blank" href="mailto:users@lists.scilab.org">users@lists.scilab.org</a><br>
  <b>Objet :</b> [scilab-Users] Automatic function loading</span></p>
  </div>
  </div>
  <p class="MsoNormal">  </p>
  <div>
  <div>
  <p class="MsoNormal"><span style="color:red;">Hi,</span></p>
  </div>
  <div>
  <p class="MsoNormal"><span style="color:red;">  I'm using Scilab
5.2.2 on Ubuntu Lucid.</span></p>
  </div>
  <div>
  <p class="MsoNormal"><span style="color:red;">  </span></p>
  </div>
  <div>
  <p class="MsoNormal"><span style="color:red;">   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 </span></p>
  </div>
  <div>
  <p class="MsoNormal"><span style="color:red;">  </span></p>
  </div>
  <div>
  <p class="MsoNormal"><span style="color:red;">genlib('comm','~/Downloads/scilab-5.2.2/comm')</span></p>
  </div>
  <div>
  <p class="MsoNormal"><span style="color:red;">  </span></p>
  </div>
  <div>
  <p class="MsoNormal"><span style="color:red;">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.</span></p>
  </div>
  <div>
  <p class="MsoNormal"><span style="color:red;">  </span></p>
  </div>
  <div>
  <p class="MsoNormal"><span style="color:red;">Vishwanath.<br>
 </span></p>
  </div>
  <p class="MsoNormal"><span style="color:red;">  </span></p>
  <div>
  <p class="MsoNormal"><span style="color:red;">  </span></p>
  </div>
  </div>
  <p class="MsoNormal">  </p>
  </div>
  </div>
  </div>
  </div>
  <br>
</blockquote>
<br>


</div></div><div style="position:fixed"></div>


</div></div><br>



      </body></html>