<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=windows-1252"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        color:black;
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body bgcolor=white lang=FR link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>Thank you for your answer<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>I am in the first case I guess (in fact the two librairies are one atoms module and one home-made scilab contribution)<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>When I try to call atoms1_lib.foo()  I get the error message (sorry it is in French on my computer)</span><span lang=EN-US style='font-size:12.0pt;font-family:"Times New Roman","serif";mso-fareast-language:FR'> : L'extraction récursive n'est pas valide dans ce contexte.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>Guylaine<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext;mso-fareast-language:FR'>De :</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext;mso-fareast-language:FR'> users [mailto:users-bounces@lists.scilab.org] <b>De la part de</b> Samuel Gougeon<br><b>Envoyé :</b> vendredi 31 juillet 2015 14:13<br><b>À :</b> International users mailing list for Scilab.<br><b>Objet :</b> Re: [Scilab-users] Resolving libraries <= (no subject)<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><div><p class=MsoNormal>Hello Guylaine,<br><br>Le 31/07/2015 11:46, Collewet Guylaine a écrit :<o:p></o:p></p></div><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><p class=MsoNormal><span lang=EN-US>Hello,</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US>I want to use together two atoms modules that have some functions with the same names. </span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US>Is there a way to indicate the name of the module I want to use when I call one function ?</span><o:p></o:p></p></blockquote><p class=MsoNormal style='margin-bottom:12.0pt'><span style='font-size:12.0pt;font-family:"Times New Roman","serif";mso-fareast-language:FR'>If both functions -- say fun() -- are functions written in Scilab language -- i mean none of them is a built-in function --,<br>then in dictinct ATOMS modules they should belong to two distinct  libraries, say atoms1_lib and atoms2_lib.<br>As far as i remember, the default foo() that will be called by foo() is the one belonging to the library<br>that has been the most recently loaded. Anyway, to force using a instanciation rather than the other, you<br>can use either atoms1_lib.foo()  or atoms2_lib.foo() syntax. This forces Scilab to use the specified library.<br><br>In case of conflict between a built-in and a function (aka "macro") : if you define a macro with the name of<br>a previously loaded built-in, the macro crushes the built-in. I do not know whether it is possible to still call <br>the built-in as is. But you can clone it before overwritting its first name -- say atoms1_foo = foo (*), and then <br>use atoms1_foo() when required -- before crushing it with the forthcoming foo(). Humm, <br>"you can" do that in an absolute way ; but if both  ATOMS modules are autoloaded, you cannot introduce <br>such a cloning instruction in the autoloading stack.<br>In such a case, you may cancel autoloading for both modules, and add loading and cloning instructions in<br>the your personal startup file.<br><br>HTH <br>Samuel<br><br>(*) this way of doing becomes the only one possible in Scilab 6, because newfun() and funptr() are being <br>removed from SCilab 6. But i met some cases for which this kind of cloning failed, while it was OK when <br>cloning with newfun("atoms1_foo", funptr("foo")). I did not clearly caught from where and when it occurred<br>-- may be when foo is used recursively.. --, but after some investigations i found that (still in scilab 5.5.2):<br>// after<br>-->funptr("disp")<br> ans  = <br>    33004.  <br><br>-->d = disp<br> d  =<br> <br>-->funptr("d")<br> ans  = <br>    0.  <br> <br>-->clear d<br> <br>-->newfun("d", funptr("disp"))<br> <br>-->funptr("d")<br> ans  = <br>    33004.  <br><br>It is somewhat reported there: <a href="http://bugzilla.scilab.org/12965">http://bugzilla.scilab.org/12965</a><br>About effects of cloning built-in:=, see also <a href="http://bugzilla.scilab.org/8281">http://bugzilla.scilab.org/8281</a><o:p></o:p></span></p></div></body></html>