On Fri, 26 Mar 2010, yinung at Gmail wrote: > I found a possible (though minor) bug about setinfo within a user > defined function. Once a variable was generated in a user's function > with a description set by common "setinfo," the "setinfo" command will > not work since the description of the corresponding variable will not > be CORRECTLY replaced. > See for example in the following script, the description of z is > always "myVariable=2" no matter what param is given. > > Thanks > Yi-Nung > > <script> > function list myf(series y,scalar param) > sprintf sInfo "%s ver= %d",argname(y),1 > series z=y*10 > setinfo z -d @sInfo > > sprintf sInfo "%s=%d",argname(y),param > series z=y*10 > setinfo z -d @sInfo > > list retlist=z > return retlist > end function > > nulldata 10 > setobs 1 1 --time-series > series myVariable=normal() > list mylist=myf(myVariable,2) > list mylist=myf(myVariable,1) > </script>
Thanks for the report; this is now fixed in CVS. Allin Cottrell