|
From: Ethan M. <merritt@u.washington.edu> - 2004-10-13 17:39:27
|
On Tuesday 12 October 2004 11:37 pm, Petr Mikulik wrote:
>=20
> The string patch is cool, and looks like complete -- is there still some
> functionality missing? Should we think to put it to cvs soon?
I was expecting more feedback, but maybe "no news =3D good news".
Yes, the core code can probably go into cvs. The add-ons should
get more discussion. I'll start separate threads for each.
Issues that have been raised regarding the core code (#1043784)
=2D The pre-defined function sprintf() requires some familiarity with=20
C language formats. Harald doesn't like this. I see it as a feature,
since the documentation is basically "see man page for sprintf"
=2D This new code supersedes the current special case hack for
formatting labels:
old: set label "foo %f %f",var1,var2
new: set label sprintf("foo %f %f",var1,var2)
If backwards-compatibilty for this specific case is required,
that may be a problem. Right now the old syntax can cause
parsing errors, so I disabled it.
=2D J=FCrgen Wieferink has pointed out that there may be problems
if a user defines a string variable that duplicates a gnuplot
keyword:
lt =3D "foo"
plot sin(x) with lines lt 3
The intention is that keyword parsing always happens first,
and certainly in this simple case it does and there is no problem.
But it wouldn't surprise me if there are some pathological cases.
I think we can just fix them as they are reported, or tell people
"don't redefine 'with' and expect anything reasonable to happen".
=2D Daniel and Petr pointed out that currently "plot ...007" actually
plots something because it is parsed as "plot 0.0 lt 0 pt 0.007".
After this patch, "plot ...007" will return some error message
about improper operands for string concatenation. I doubt that
this will affect any real world cases.
=2D-=20
Ethan A Merritt merritt@u.washington.edu
Biomolecular Structure Center
Mailstop 357742
University of Washington, Seattle, WA 98195
|