Am 30.03.2022 um 23:31 schrieb Sven Schreiber:
Whoops, hit the send button prematurely. I'm afraid the example will
have to wait a bit, I'm not finding a good dataset example so easily.
So here goes an extremely artificial example:
<hansl>
nulldata 3
series whatever = normal() # just to see the resulting markers in the GUI
series countrycodes = index
stringify(countrycodes, defarray("FR","DE","IT"))
print countrycodes
# the old genr idiom for creating obs markers
genr markers = "%s", countrycodes
# equivalent way without an explicit genr
strings newmarkers = array($nobs)
loop i = 1..$nobs
newmarkers[i] = sprintf("%s", countrycodes[$t1-1 + i])
endloop
markers --from-array=newmarkers
</hansl>
Obviously, the substitute way currently is still very clunky. Perhaps in
the future sprintf() could be somehow extended or overloaded to work
with string-valued series directly.
Of course this whole business is not very important. It's just that
"genr markers" is not documented very transparently. I will try to add a
bullet item to the list in section 10.1 of the manual.
cheers
sven