On Tue, 30 Jul 2019, Artur Tarassow wrote:
> <hansl>
> pkg info armax
> bundle b = $result
> </hansl>
>
Looks good to me ;-) Let's see what others have to say on this.
Or we could simply use a function with an optional argument for
non-standard locations:
<hansl>
function bundle pkginfo(string name, string location[null])
string dir = exists(location) ? location : "@dotdir/functions/"
pkgfile = dir ~ name ~ ".gfn"
bundle ret = null
catch xmldata = readfile(pkgfile)
if $error
printf "package file %s not found or unreadable\n", pkgfile
return ret
endif
loop foreach i version tags date --quiet
ret.$i = xmlget(xmldata, "/gretl-functions/gretl-function-package/$i")
endloop
return ret
end function
eval pkginfo("armax")
</hansl>
-------------------------------------------------------
Riccardo (Jack) Lucchetti
Dipartimento di Scienze Economiche e Sociali (DiSES)
Università Politecnica delle Marche
(formerly known as Università di Ancona)
r.lucchetti(a)univpm.it
http://www2.econ.univpm.it/servizi/hpp/lucchetti
-------------------------------------------------------