<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">You can do it with the macrovar
primitive.<br>
<br>
S.<br>
<br>
Le 29/05/13 22:56, Adrien Vogt-Schilb a écrit :<br>
</div>
<blockquote cite="mid:51A66B70.7030002@centre-cired.fr" type="cite">
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<div class="moz-cite-prefix">you cannot.<br>
<br>
But you can provide the function directly with the name of your
variable, and transform te name of the variable into the
variable by evaluating it...<br>
<br>
function f(nameofvar1,nameofvar2)<br>
<br>
var1 = evstr(nameofvar1)<br>
var2 = evstr(nameofvar2)<br>
disp(nameofvar1 + " + "+ nameofvar2 +" is "+string(var1
+var2))<br>
<br>
endfunction<br>
<br>
a=5;<br>
b=7;<br>
<br>
f("a","b")<br>
<br>
On 29/05/2013 22:49, pierre vuillemin wrote:<br>
</div>
<blockquote
cite="mid:CAPvk+W=G=7PdUzDiC2qnRS_nXAmAcg8zbU4HBgz0WKANFV8Zjw@mail.gmail.com"
type="cite">
<div dir="ltr">
<div>
<div>
<div>
<div>
<div>Hello,<br>
<br>
</div>
I would like to know if there exists a way to get the
name of function's inputs arguments, i.e., if I have
the following function<br>
<br>
</div>
function y = f(a,b)<br>
..<br>
</div>
endfunction<br>
<br>
</div>
and that I call it like y = f(var1,var2), is it possible to
know, inside my function f, that the first input argument a
is called "var1" and that the second one is called "var2" ?<br>
<br>
</div>
Pierre<br>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
users mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:users@lists.scilab.org">users@lists.scilab.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://lists.scilab.org/mailman/listinfo/users">http://lists.scilab.org/mailman/listinfo/users</a>
</pre>
</blockquote>
<br>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<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>