[Scilab-users] Getting the variable name used for a function input argument

Stéphane Mottelet stephane.mottelet at utc.fr
Wed Nov 24 09:53:03 CET 2021


Jens, please do not use "Reply to:" on an old thread when this is 
irrelevant.

You can create a new thread by directly mailing users at lists.scilab.org

S.

Le 23/11/2021 à 21:18, Jens Simon Strom a écrit :
>
> Hi Scilab friends,
> 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?
>
> Example:
>
> function [name,y]=foo(x)
>    name=???
>    y=x^2
> endfunction
>
> xNum=123.
> [name,y]=foo(xNum)
> The result for name should be the string "xNum"
>
> Regards
> Jens
> _______________________________________________
> users mailing list
> users at lists.scilab.org
> https://antispam.utc.fr/proxy/v3?i=Z09lbVhROVBaOHd3NjZZMVfTogSUUCLtvQYv_TI7-Qg&r=eVVJWkdic3NtZTdZV2pycc8oEJBVcQfwoAgOILbixruFQP-mXZOvGI-Awo-iPm4W&f=UU9IMnpkdmJmSk9YOHVtc4JNomkUGubf8DA_bzrUn-Hiq5VuGo_VlJP1TQC7yyVL&u=http%3A//lists.scilab.org/mailman/listinfo/users&k=eFRI 
>

-- 
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
http://www.utc.fr/~mottelet




More information about the users mailing list