Am 28.11.20 um 15:21 schrieb Allin Cottrell:
On Sat, 28 Nov 2020, Artur Tarassow wrote:
> I stumbled over the following behavior when trying to define a bundle
> using the new syntax _() introduced with gretl 2020e:
>
> <hansl>
> scalar V1 = 0.5
> scalar V2 = -0.2
>
> bundle B = _(V1, V2) # works well
> print B
>
> bundle C = _(V1) # fails when only single item is added
> bundle D = _(V2) # fails
> </hansl>
>
> 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.
Works fine. Thank you Allin!
Artur