Am 12.05.2013 12:27, schrieb Allin Cottrell:
On Sat, 11 May 2013, Allin Cottrell wrote:
> On Fri, 10 May 2013, Sven Schreiber wrote:
>
>> I think I found a bug in gretl that is quite subtle. The attached script
>> demonstrates the bug -- or actually in its current form it demonstrates how
>> to work around the bug. [...]
>
> Thanks, Sven. Actually, not so terribly subtle. What's broken is the idiom
>
> bundle.member -= decrement
> bundle.member += increment
>
> and the moment I saw that I thought "Uh oh, that's not going to work, is
it?"
> If you replace it with
>
> bundle.member = bundle.member - decrement
> bundle.member = bundle.member + decrement
>
> it should work fine.
>
> Obviously, however, we need to either (a) make the idiom you cited work right
> or (b, last resort) disallow it with an error message -- and not just
> silently mess up.
For the present, plan (b) is implemented in CVS: you get an
error message if you try "modified assignment" (such as "+=")
to a bundle member. We can revisit this, but it'll be quite
complicated to implement plan (a).
Thanks, no problem about the impossibility of +=; (informative) error
messages are a good thing!
And BTW, it's a joy to be able to write syntax like "in.re" to access
the bundle member "re"!
cheers,
sven