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.

thanks

sven
_______________________________________________
Gretl-devel mailing list -- gretl-devel@gretlml.univpm.it
To unsubscribe send an email to gretl-devel-le...@gretlml.univpm.it
Website: 
https://gretlml.univpm.it/postorius/lists/gretl-devel.gretlml.univpm.it/

Reply via email to