<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    Hi,<br>
    Thanks for all the responses and sorry for not beeing able to answer
    before now.<br>
    <br>
    The background of my question was to write a function for formatted
    output of complex variables in polar form with <br>
    <pre style="font-family:Arial;font-style:normal;font-size:18.0;"><span style="color:rgb(50,185,185);">mprintf </span>like
</pre>
    function printc(c)<br>
    <br>
    which returns the name of c on calling level, |c|, and the angle.<br>
    <br>
    I understand now that I have to write e. g.<br>
    <br>
    function printc(c,cname)<br>
    <br>
    where cname is the wanted string. This can even give some additional
    freedeom in modifying the output name.<br>
    <br>
    Regards<br>
    Jens<br>
    <br>
    <br>
    <div class="moz-cite-prefix">Am 24.11.2021 um 09:51 schrieb Stéphane
      Mottelet:<br>
    </div>
    <blockquote type="cite"
      cite="mid:d2524bec-c4bd-7a40-d74b-baf5eab7edb8@utc.fr">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <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/" moz-do-not-send="true">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 moz-txt-link-freetext" href="mailto:users@lists.scilab.org" moz-do-not-send="true">users@lists.scilab.org</a>
<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>
</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" moz-do-not-send="true">http://www.utc.fr/~mottelet</a>
</pre>
      <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>
    <br>
  </body>
</html>