On Sun, Jan 14, 2024 at 3:22 AM Sven Schreiber
<sven.schreiber(a)fu-berlin.de> wrote:
Hi function writing experts,
in the context of writing (or moderating) function packages I'm
wondering when exactly has it become possible to pass through a null
argument to a called sub-function?
Here's what I mean (adapted from an example by Allin):
<hansl>
function scalar f2 (bundle b[null])
return 0
end function
function scalar f1 (bundle b[null])
eval exists(b)
return f2(b) # currently working even if !exists(b)
end function
# in main (or in some other function)
eval f1()
</hansl>
This is tested and working with a recent snapshot.
However, before the year 2023 (I think) the example above would yield an
error, because inside the f1 function the object b wouldn't be defined
and couldn't be directly passed on to f2.
I checked gretl's changelog and couldn't find a related entry, but I
know we had some discussions (partly off-list) in 2023 about it.
So assuming that this behavior is here to stay, the question is, which
gretl version is the minimal one to support it? I'm guessing 2023b or 2023c.
gretl 2023b was the first version to support this. The work was done
shortly after the 2023a release.
Allin Cottrell