On Mon, 21 Nov 2016, cociuba mihai wrote:
It's the same.
I also verified the latest modification done in git and have the same.
Maybe is some error from my system, could also someone else test it?
The example works OK for me (but then it also worked before I made
the latest change). Could it be something to do with Stata versions?
I'm running Stata 12.1 -- what are you running?
Allin
#######################
program define gretl_export
version 8.2
local matrix `1'
local fname `2'
tempname myfile
cd "/home/acer/.gretl"
file open `myfile' using "`fname'", write text replace
local nrows = rowsof(`matrix')
local ncols = colsof(`matrix')
file write `myfile' %8.0g (`nrows') %8.0g (`ncols') _n
forvalues r=1/`nrows' {
forvalues c=1/`ncols' {
file write `myfile' %15.0e (`matrix'[`r',`c']) _n
}
}
file close `myfile'
end
######################