[Gretl-devel] Re: Since when (gretl version) is pass-through of null arguments supported?

2024-01-15 Thread Sven Schreiber

Am 15.01.2024 um 19:19 schrieb Cottrell, Allin:

On Sun, Jan 14, 2024 at 3:22 AM Sven Schreiber
  wrote:


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.


OK, thanks Allin!

cheers

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/


[Gretl-devel] Re: Since when (gretl version) is pass-through of null arguments supported?

2024-01-15 Thread Cottrell, Allin
On Sun, Jan 14, 2024 at 3:22 AM Sven Schreiber
 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):
>
> 
>
> 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()
>
> 
>
> 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
___
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/