<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<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. The name is lost
in the process. <br>
<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>
<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" href="mailto:users@lists.scilab.org">users@lists.scilab.org</a>
<br>
<a class="moz-txt-link-freetext" href="http://lists.scilab.org/mailman/listinfo/users">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;">
<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"><img src="https://ipmcdn.avast.com/images/icons/icon-envelope-tick-round-orange-animated-no-repeat-v1.gif" alt="" width="46" height="29" style="width: 46px; height: 29px;" /></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;">www.avast.com</a> </td>
</tr>
</table>
<a href="#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2" width="1" height="1"> </a></div></body>
</html>