|
From: Hans-Bernhard B. <HBB...@t-...> - 2011-10-06 22:46:11
|
On 06.10.2011 10:01, Shigeharu TAKENO wrote:
> I saw that gnuplot.exe of CVS version compiled by VC++ reports
[...]
> foo = sprintf("%40d %40d %40d %40d %40d %40d",1,2,3,4,5,6)
> ^
> "stringvar.dem", line 59: undefined value
For what it's worth: this program doesn't appear in gnuplot.exe compiled
by Open Watcom.
> The gnuplot show no erorr message for the command
>
> foo = sprintf("%83d",1)
>
> but it show the same error message above for the command
>
> foo = sprintf("%84d",1)
This doesn't cause problem either.
The root of the problem appears to be the buffer size computation and
subsequent realloc()ation in f_sprintf(). The number 84 is magic
because it's 84 plus the length of the format string "%84d". Go figure.
|