Am 26.10.2018 um 14:46 schrieb Allin Cottrell:
On Fri, 26 Oct 2018, Sven Schreiber wrote:


I don't mean to imply any consequences (except perhaps warnings and hints to package writers in the docs), but for completeness it should perhaps be noted that this is not entirely true: If you receive a list argument and pick out certain series their names come from the outside.

But they cannot be referenced by their outer names within the function, you have to use the List.$i syntax. Here's an example:

<hansl>
function void argnames (list L)
  loop foreach i L
    series x$i = L.$i(-1)
    print x$i
  endloop
end function

open denmark
rename LRY sin # try to cause trouble!
list X = LRM sin
argnames(X)
</hansl>

Inside argnames() we're able to take a lag of the series known as "sin" in main without a problem.
Also good to know, but what I meant is something like this:

<hansl>
clear
function list LRM(int i)
  print "just to have a function with this name"
  list L1 = null
  return L1
end function

function list exlag(list L)
  s = varnames(L)[1]
  series @s = L[1]
  list out = @s(-1)
  return out
end function

open denmark
list Lo = exlag(LRM)
list Lo print
</hansl>

Again, I'm not saying these artificial cases have to be caught, just adding this example for completeness.

cheers,
sven