[Scilab-users] Name of function's input arguments
Adrien Vogt-Schilb
vogt at centre-cired.fr
Wed May 29 22:56:16 CEST 2013
you cannot.
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...
function f(nameofvar1,nameofvar2)
var1 = evstr(nameofvar1)
var2 = evstr(nameofvar2)
disp(nameofvar1 + " + "+ nameofvar2 +" is "+string(var1 +var2))
endfunction
a=5;
b=7;
f("a","b")
On 29/05/2013 22:49, pierre vuillemin wrote:
> Hello,
>
> 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
>
> function y = f(a,b)
> ..
> endfunction
>
> 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" ?
>
> Pierre
>
>
> _______________________________________________
> users mailing list
> users at lists.scilab.org
> http://lists.scilab.org/mailman/listinfo/users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20130529/4e91d58d/attachment.htm>
More information about the users
mailing list