Am 20.06.2021 um 16:13 schrieb Allin Cottrell:
On Sun, 20 Jun 2021, Sven Schreiber wrote:
"varlist" is not showing series 1 to 4 because they're not supposed to
be visible inside the function; they were not passed in. It's showing
"[masked]" for series 5 and 6 because they were passed as list
members, and inside the function you're supposed to access them via
the list, or individually as <listname>.$i.
Thanks for the explanation, Allin!
As you write below, perhaps then the printout for "list L print" should
also output something like L.d_LRY instead.
> OK, then in my use case I'm also using 'append' (inside the function) to
> load data from a csv file. The first part of that csv file contains the
> same data as in the list L, with the same series names. However,
> afterwards it seems that for example d_LRY appears twice in the dataset
> - at least it's the result of an empty "print".
You've added a new series, "d_LRY", local to the function. This leaves
undisturbed the series passed in via list, which could be accessed
inside the function as L.d_LRY. The new "d_LRY" will not propagate to
the caller unless you return it.
Again, thanks. Indeed, it was may intention to return the newly appended
series in a list, and I wasn't sure what the effect of this seeming
"duplication" would be.
If there's a bug here, it's that the "print" (all series) command
shows the name "d_LRY" twice:
Yes, that was the source of my worries.
on the first occurrence it should probably be shown as
"[masked]" or
as "L.d_LRY". In fact, if it can be arranged without too much
difficulty, we might replace all occurrences of "[masked]" with the
form "listname.seriesname".
Sounds quite reasonable.
thanks
sven