Dear all,
Below is a script illustrating the problem
# creates list of all global series
function list fun1(void)
    list retlist = seq(1,$nvars-1)
    return retlist
end function
# identity list function
function list fun2(list a_list)
    return a_list
end function
# checking function
function void fu(string name)
    catch eval @name
    err = $error
    if err
        printf "Variable %s is not defined\n", name
    endif
    
end function 
#contaminating function
function void spoil(void)
    list list1 = fun1()
    list list2 = fun2(list1)
end function
###### example
nulldata 20
set seed 13
x1 = normal()
# before
fu("x1")
# looking at x1
print x1
# spoiling
spoil()
# after
fu("x1")
On the first run fu("x1") does not know
global series 'x1' but after running spoil()
fu("x1") knows and evaluates x1
Oleh