On Wed, 2 Nov 2022, Federico Fiorani wrote:
Dear all,
I noticed this thing.
(gretl 2022c on Windows)
<hansl>
strings s = null
s[""]
</hansl>
<output>
? strings s = null
? s[""]
Index value 969423488 is out of bounds
Error executing script: halting
>s[""]
</output>
The number changes at every run. (maybe a memory address?)
No string (empty or otherwise) can be a valid index into an array (or
matrix, or string), so the example above should provoke a
non-conformable types error -- and now it does in git.
However, a string in square brackets can be a valid accessor for a
bundle element, and equivocation over that point explains why the
error wasn't being caught correctly before.
The same problem occurs with arrays and bundles
Hmm, I'm not seeing a problem with bundles. Even before today's fix I
was getting:
<hansl>
bundle b = null
b[""]
</hansl>
<output>
? bundle b = null
? b[""]
"": no such item
Terminated on error
</output>
which seems quite correct. What are you seeing with bundles?
Allin