<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Hi,<br>
    </p>
    <div class="moz-cite-prefix">Le 24/11/2021 à 01:42, Federico Miyara
      a écrit :<br>
    </div>
    <blockquote type="cite"
      cite="mid:1250650f-0161-3eff-37ee-1ea69b625508@fceia.unr.edu.ar">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <br>
      <font face="Courier New">I'm not completely sure, but I think this
        is not possible since what is passed to the function isn't a
        variable but the value contained in the variable.</font></blockquote>
    <font face="Courier New">No. Internally, input arguments are passed
      as references to the true object. There is no copy unless an input
      argument is modified in the function (in that case a copy with
      local scope only). </font><br>
    <blockquote type="cite"
      cite="mid:1250650f-0161-3eff-37ee-1ea69b625508@fceia.unr.edu.ar"><font
        face="Courier New"> The name is lost in the process.<br>
      </font></blockquote>
    <font face="Courier New">Yes, before the first line of the function
      body the original object has the name of the argument, although
      both names refer to the same object.</font><br>
    <blockquote type="cite"
      cite="mid:1250650f-0161-3eff-37ee-1ea69b625508@fceia.unr.edu.ar"><font
        face="Courier New"> <br>
        An alternative way (but I don't know if this would be acceptable
        for you) is that the function had as its argument a variable
        name (hence, a string), so your x would be "xNum", instead of
        123. Then you could use evstr() to get the value of the variable
        to proceed with the processing.<br>
      </font></blockquote>
    <p><font face="Courier New">I think that we are in the presence of
        an XY problem (<a class="moz-txt-link-freetext" href="https://xyproblem.info/">https://xyproblem.info/</a>) and that Jens should
        explain the whole story.</font></p>
    <p><font face="Courier New">S.<br>
      </font></p>
    <blockquote type="cite"
      cite="mid:1250650f-0161-3eff-37ee-1ea69b625508@fceia.unr.edu.ar"><font
        face="Courier New"> <br>
        Regards,<br>
        <br>
        Federico Miyara<br>
        <br>
      </font><br>
      <div class="moz-cite-prefix">On 23/11/2021 17:18, Jens Simon Strom
        wrote:<br>
      </div>
      <blockquote type="cite"
        cite="mid:740fb2a0-d406-6aa5-b02c-0fd2fcb9bf49@hslmg.de"> <br>
        Hi Scilab friends, <br>
        Given a numeric variable like xNum as an input argument of a
        function call, how can I produce the variable name string "xNum"
        within the function? <br>
        <br>
        Example: <br>
        <br>
        function [name,y]=foo(x) <br>
           name=??? <br>
           y=x^2 <br>
        endfunction <br>
        <br>
        xNum=123. <br>
        [name,y]=foo(xNum) <br>
        The result for name should be the string "xNum" <br>
        <br>
        Regards <br>
        Jens <br>
        _______________________________________________ <br>
        users mailing list <br>
        <a class="moz-txt-link-abbreviated moz-txt-link-freetext"
          href="mailto:users@lists.scilab.org" moz-do-not-send="true">users@lists.scilab.org</a>
        <br>
        <a class="moz-txt-link-freetext"
          href="http://lists.scilab.org/mailman/listinfo/users"
          moz-do-not-send="true">http://lists.scilab.org/mailman/listinfo/users</a>
        <br>
        <br>
        <br>
      </blockquote>
      <br>
      <div id="DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2"><br>
        <table style="border-top: 1px solid #D3D4DE;">
          <tbody>
            <tr>
              <td style="width: 55px; padding-top: 18px;"><a
href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient"
                  target="_blank" moz-do-not-send="true"><img
src="https://ipmcdn.avast.com/images/icons/icon-envelope-tick-round-orange-animated-no-repeat-v1.gif"
                    alt="" style="width: 46px; height: 29px;"
                    moz-do-not-send="true" width="46" height="29"></a></td>
              <td style="width: 470px; padding-top: 17px; color:
                #41424e; font-size: 13px; font-family: Arial, Helvetica,
                sans-serif; line-height: 18px;">Libre de virus. <a
href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient"
                  target="_blank" style="color: #4453ea;"
                  moz-do-not-send="true">www.avast.com</a> </td>
            </tr>
          </tbody>
        </table>
        <a href="#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2" width="1"
          height="1" moz-do-not-send="true"> </a></div>
      <br>
      <fieldset class="moz-mime-attachment-header"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:users@lists.scilab.org">users@lists.scilab.org</a>
<a class="moz-txt-link-freetext" href="http://lists.scilab.org/mailman/listinfo/users">http://lists.scilab.org/mailman/listinfo/users</a>
</pre>
    </blockquote>
    <pre class="moz-signature" cols="72">-- 
Stéphane Mottelet
Ingénieur de recherche
EA 4297 Transformations Intégrées de la Matière Renouvelable
Département Génie des Procédés Industriels
Sorbonne Universités - Université de Technologie de Compiègne
CS 60319, 60203 Compiègne cedex
Tel : +33(0)344234688
<a class="moz-txt-link-freetext" href="http://www.utc.fr/~mottelet">http://www.utc.fr/~mottelet</a>
</pre>
  </body>
</html>