On Sat, 28 Nov 2020, Artur Tarassow wrote:
I stumbled over the following behavior when trying to define a bundle
the new syntax _() introduced with gretl 2020e:
scalar V1 = 0.5
scalar V2 = -0.2
bundle B = _(V1, V2) # works well
bundle C = _(V1) # fails when only single item is added
bundle D = _(V2) # fails
Ok, the doc says "The second variant is designed for the case where you wish
to pack several pre-existing named objects into a bundle..."
Why is _() supposed to work only with "several pre-existing named objects"?
The code to detect this variant of the new syntax (without any
explicit keys) relied on there being more than one argument.
However, that's not really necessary and the singleton case is now
supported in git.