On Wed, 7 Jan 2015, Sven Schreiber wrote:
Hi,
I upgraded to the latest snapshot (Dec 31st) and encountered a strange
behavior. Unfortunately I couldn't produce a minimal example. This is in
the context of a panel dataset with a sample restriction in place that
picks out a single time period.
Then a function of mine is called, one of the arguments is a series
named "ave_inc_gr", and the corresponding argument name inside the
function is "thresh".
Now I have the following debug code inside this function, and I report
the output as comments:
# should give 0, since 'thresh' exists in the function's scope:
check = isnull(thresh)
# but actually gives 1:
print check
# but in this very next line, 'thresh' is accepted (no error):
string mys = argname(thresh)
# and gives the correct passed argument's name "ave_inc_gr":
print mys
This feels very weird, or am I blind and missing something obvious?
Careful: isnull() doesn't mean "isn't there": it means "it's
there, and
takes the value 'null'".
-------------------------------------------------------
Riccardo (Jack) Lucchetti
Dipartimento di Scienze Economiche e Sociali (DiSES)
Università Politecnica delle Marche
(formerly known as Università di Ancona)
r.lucchetti(a)univpm.it
http://www2.econ.univpm.it/servizi/hpp/lucchetti
-------------------------------------------------------