Or if you don't mind using string substitution, you could use
"rename":
<hansl>
function matrix myfunction (series depY, list X)
string realname = argname(depY)
rename depY @realname
ols @realname X
...
end function
</hansl>
That's cool too. Indeed I tried something similar but missed to add "@" for
'realname'...and obviously, it didn't work :)
Thank you Allin,
Artur