[Gretl-users] WG: append horizontal and vertical

Allin Cottrell cottrell at wfu.edu
Fri Sep 22 14:10:29 EDT 2017


On Thu, 21 Sep 2017, Allin Cottrell wrote:

> On Thu, 21 Sep 2017, Schaff, Frederik wrote:
>
>> I tried Jack's idea again (see attached, it's a bit long), the problem 
>> remains that the long string "v" holding all the string names cannot be 
>> printed. I found that 'printf "%s",v' does not work but 'print v' does... 
>> That is the reason why the 'join @cmd' does not hold the variable names.
>
> Hmm, this is quite odd. There's no such problem on Linux but I tried testing 
> on Windows and I now see what you mean. There seems to be a string-length 
> problem with [s]printf on Windows; I'll investigate.

I'm glad you exposed this problem. Gretl's "printf" and "sprintf" are 
implemented internally using the C-library function vsnprintf and it 
turns out we were missing something: on Windows vsnprintf doesn't 
conform to the ISO C standard by default; you have to define a special 
macro to get standard-conforming behavior. We're now doing that (in 
git and snapshots). So the workaround I described is no longer needed.

Allin


More information about the Gretl-users mailing list