<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /></head><body style='font-size: 10pt'>
<p>Glad to know that it has been fixed. Thank you for your answer.</p>
<p>Best regards,</p>
<p>Pierre</p>
<p><br /></p>
<p>Le 10.12.2016 15:09, Samuel Gougeon a écrit :</p>
<blockquote type="cite" style="padding: 0 0.4em; border-left: #1010ff 2px solid; margin: 0"><!-- html ignored --> <!-- head ignored --><!-- meta ignored -->
<div class="moz-cite-prefix">Hello Pierre,<br /> <br /> Le 07/12/2016 10:04, Pierre Vuillemin a écrit :</div>
<blockquote type="cite" style="padding: 0 0.4em; border-left: #1010ff 2px solid; margin: 0">Hi all, <br /> <br /> I have to create unique IDs for some object in Scilab. For that purpose, someone kindly guided me towards the UUID class of java, which lead me to create this function in Scilab, <br /> <br /> function id = make_id() <br />    UUID     = jimport("java.util.UUID", %f) <br />    tmp      = jinvoke(UUID,"randomUUID") <br />    id       = jinvoke(tmp,"toString") <br /> endfunction <br /> <br /> It works fine. <br /> <br /> An a priori similar function is <br /> <br /> function id = make_id_err() <br />    UUID     = jimport("java.util.UUID", %f) <br />    tmp      = UUID.randomUUID() <br />    id       = tmp.toString() <br /> endfunction <br /> <br /> where the methods are called without jinvoke. While the instructions of the latter function work well in the terminal, they lead to an error when trying to exec the function 'make_id_err'. <br /> <br /> I was wondering if it is a normal behaviour? </blockquote>
<small><tt><big>No, but the bug is fixed in Scilab 6.0:<br /> </big><br /> In Scilab 5.5.2:<br /> -->endfunction</tt><tt><br /> </tt><tt>   UUID     = jimport("java.util.UUID", %f)</tt><tt><br /> </tt><tt>                !--error 26 </tt><tt><br /> </tt><tt>Récursivité trop complexe ! (Les tables de récurrence sont pleines)</tt><tt><br /> </tt><tt>at line       2 of function make_id_err called by :  </tt><tt><br /> </tt><tt>   tmp      = UUID.randomUUID()</tt><tt><br /> </tt><tt>at line       3 of function make_id_err called by :  </tt><tt><br /> </tt><tt>   tmp      = UUID.randomUUID()</tt><tt><br /> </tt><tt>at line       3 of function make_id_err called by :  </tt><tt><br /> </tt></small>... etc<br /> <br /> In Scilab 6.0:<br /> <tt>--> getversion("scilab")</tt><tt><br /> </tt><tt>  ans  =</tt><tt><br /> </tt><tt>    6.   0.   0.   1.477D+09</tt><tt><br /> </tt><tt> <br /> --> function id = make_id_err()</tt><tt><br /> </tt><tt>  >    UUID     = jimport("java.util.UUID", %f)</tt><tt><br /> </tt><tt>  >    tmp      = UUID.randomUUID()</tt><tt><br /> </tt><tt>  >    id       = tmp.toString()</tt><tt><br /> </tt><tt>  > endfunction</tt><tt><br /> </tt><tt></tt><tt><br /> </tt><tt>--> make_id_err()</tt><tt><br /> </tt><tt> ans  =</tt><tt><br /> </tt><tt> 49e4f3f1-736a-435f-bc26-f7061f10de27</tt><tt><br /> </tt><br /> BR<br /> Samuel <br /><!-- html ignored --><br />
<div class="pre" style="margin: 0; padding: 0; font-family: monospace">_______________________________________________<br /> users mailing list<br /> <a href="mailto:users@lists.scilab.org">users@lists.scilab.org</a><br /> <a href="http://lists.scilab.org/mailman/listinfo/users">http://lists.scilab.org/mailman/listinfo/users</a></div>
</blockquote>
<p><br /></p>

</body></html>