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

Jens Simon Strom j.s.strom at hslmg.de
Tue Nov 23 21:18:31 CET 2021


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



More information about the users mailing list