|
From: Ethan M. <merritt@u.washington.edu> - 2005-06-30 20:09:31
|
On Thursday 30 June 2005 03:49 am, Juergen Wieferink wrote: > This is possible without evaluating anything twice. The major > drawback is that this doesn't work well with GP_STRING_VARS being > optional. [Could STRINGs be allowed without GP_STRING_VARS for this > special case?] Yes, but that isn't sufficient. The expression evaluation code would have to be modified so that const_express() will do something reasonable if the next token on the command line is a string literal. By the time you do that, I don't see that you've saved much over just enabling string variables. There's just not that much code involved in handling string variables per se. Any increase in overall size comes from the addition of built-in string functions like sprintf(). I don't see much down-side to permanently enabling string variables. There have been no reports of string variables breaking existing scripts or usage. There are some desireable un-implemented features, like the current discussion about using string-valued functions as arguments "plot/splot/fit". But other than that the feedback has been to point out places where the older test isstring() should be replaced by the new, more general, code. So far this has usually simplified the call site, rather than complicating it. It's just kind of tedious inspecting and revising the remaining 50+ instances of isstring() one by one. -- Ethan A Merritt merritt@u.washington.edu Biomolecular Structure Center Mailstop 357742 University of Washington, Seattle, WA 98195 |