Am 07.12.2012 14:57, schrieb Allin Cottrell:
On Fri, 7 Dec 2012, Sven Schreiber wrote:
> I have loops which create and overwrite bundles, and afterwards I get
> many bundles with exactly the same names in the icon view. So
> replacing/overwriting doesn't seem to work. (This is the latest release
> --not the snapshot-- on windows 7, from the non-admin zip package.) When
> trying to open (double-clicking) one of these items, gretl crashes.
>
> It happens in various settings:
>
> * In one case, the bundle is an input argument to a function. What's
> funny is that the name in the icon view is not the name of the bundle in
> the outer scope, but the argument name inside the function.
>
> * In another case, the bundle is created in the top-level scope of the
> script, but I also tried to explicitly do 'delete <nameofbundle>'
before
> creating it again, and it didn't seem to work. Note that here also the
> bundle is the return value of a function.
>
> * In both cases, the number of icons with identical names in the icon
> view does not seem to coincide with the number of loop repetitions.
Could you post a test-case script, please?
I was going to say, no it's not possible, but actually here is one:
<hansl>
open denmark # just for tabula rasa
function bundle heyho(bundle indata)
bundle output
matrix m = indata["m1"]
output["m1copied"] = m
return output
end function
bundle passit
loop 10
matrix mtemp = ones(2,2)
passit["m1"] = mtemp
getoutput = heyho(passit)
endloop
</hansl>
thanks,
sven