<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Le 17/08/2017 à 11:10, Samuel Gougeon a
      écrit :<br>
    </div>
    <blockquote cite="mid:95c46ee8-c789-59aa-bad0-26b284de4943@free.fr"
      type="cite">
      <meta content="text/html; charset=windows-1252"
        http-equiv="Content-Type">
      <div class="moz-cite-prefix">Hi Hermes,<br>
        <br>
        Le 17/08/2017 à 10:31, Hermes a écrit :<br>
      </div>
      <blockquote cite="mid:1502958696069-4036889.post@n3.nabble.com"
        type="cite">
        <pre wrap="">Hi Samuel,
Good morning, please guide me how to update scilab so I can use the update
function: vectorfind.

I have writw access to Scilab installation directory
Gracias</pre>
      </blockquote>
      <br>
      There are several ways to include it in Scilab. All ways require
      first to download vectorfind.sci:<br>
      <ul>
        <li>Go here: <a moz-do-not-send="true"
            class="moz-txt-link-freetext"
            href="https://codereview.scilab.org/#/c/19055/">https://codereview.scilab.org/#/c/19055/</a></li>
        <li>Click on the vectorfind.sci line</li>
        <li>On the right green panel, click on the download icon ending
          the list of <i>Patch Set</i>, at the (not very) top of the
          panel. Unzip and save the .sci as <i>vectorfind.sci</i>
          somewhere on your disk.</li>
      </ul>
      <p>Then, if you just want to test vectorfind(), you must just do:</p>
      <p><tt>--> exec("path/to/vectorfind.sci",-1);</tt></p>
      <p>This will redefine it. But any<tt> clear</tt> instruction can
        remove it (and automatically restore the default version).<br>
        You can do that in your personal startup file:<br>
        <tt>--> edit SCIHOME/scilab.ini</tt><br>
        <tt>--> // Then add the exec(..) instruction, providing an
          absolute path, and save.</tt><tt><br>
        </tt><tt>--> // You will have then the new vectorfind for
          each forthcoming Scilab session,<br>
          --> // but still proned to erasing with "clear".<br>
          --> // You may also use</tt></p>
      <p><tt>--> getd("path/to/vectorfind/dir")<br>
        </tt></p>
      <p><tt>--> // instead of the exec() instruction. See help
          getd()<br>
        </tt></p>
      <p>If you wish to have it protected against "<tt>clear</tt>", you
        must <br>
      </p>
    </blockquote>
    <br>
    Arrr.., as usual, the proposed way is not enough to actually protect
    it in its own <b>vectorfindlib</b> library, because the <b>vectorfindlib</b>
    variable should be protected as well, and <a
href="http://mailinglists.scilab.org/Scilab-users-Replacing-predef-with-an-actual-varprot-a-top-5-priority-for-Scilab-6-1-lt-At-last-prote-tt4036564.html#a4036565">this
      is not possible</a>.<br>
    <br>
    So, the only protected solution would be to really replace
    vectorfind.sci in its SCI/modules/elementary_functions/macros native
    directory, and recompile the library (been scilab admin):<br>
    <ul>
      <li>// save the default vectorfind.sci in a tmp dir (renaming as
        vectorfind_.sci is not enough)<br>
        // replace it with the new proposed one<br>
        // Then<br>
        <br>
        <tt>predef clear</tt><tt><br>
        </tt><tt><tt>path = SCI+"/modules/elementary_functions/macros";</tt><tt><br>
          </tt>genlib("elementary_functionslib", path)      // in Scilab
          6<br>
        </tt><tt><tt>// genlib("elementary_functionslib", path, %T)  //
            in Scilab 5<br>
          </tt></tt><br>
        // Then restart Scilab. It should be OK</li>
    </ul>
    <p><br>
    </p>
  </body>
</html>