Hi Sven,
many thanks! I am hopefully on the right track, now.
Best
Frederik
Von: gretl-users-bounces(a)lists.wfu.edu [mailto:gretl-users-bounces@lists.wfu.edu] Im
Auftrag von Sven Schreiber
Gesendet: Montag, 8. Januar 2018 17:25
An: gretl-users(a)lists.wfu.edu
Betreff: Re: [Gretl-users] function - pass global string variable via pointer
Am 08.01.2018 um 11:29 schrieb Schaff, Frederik:
values I can also load, say as defaults in the function header, to other functions (b).
Finally (c), is there an option to define pointer-type string variables and pass pointers
to a string?
I'm not sure I understand the (c) question. If you mean something like the following,
this works:
<hansl>
function void sp(string *s)
print s
s = "new content"
print s
end function
string s1 = "hello"
sp(&s1)
printf "outside: %s", s1
</hansl>
hth,
sven