One more go on this...

On Tue, Mar 21, 2023 at 1:53 PM Sven Schreiber
<sven.schrei...@fu-berlin.de> wrote:

> <hansl>
> function void level2 (string s2)
>     eval exists(s) ? s : "nothing"
> end function

[ BTW note confusion between s2 and s here ]

> function void level1 (string s1[null])
>     if !exists(s1)
>         string s1 = null    # this second null-setting is necessary
>     endif
>     level2(s1)
> end function
>
> level1()
> </hansl>

The second null-setting is never necessary. Revised version:

<hansl>
function void level2 (string s2[null])
    eval exists(s2) ? s2 : "nothing"
end function

function void level1 (string s1[null])
   level2(exists(s1) ? s1 : null)
end function

level1()
</hansl>

Allin
_______________________________________________
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