|
From: Ethan A M. <merritt@u.washington.edu> - 2006-08-14 05:04:38
|
On Sunday 13 August 2006 09:37 pm, you wrote:
> >>> Shouldn't we expect the same error message?
> >>> (and "internal error: ...", not "... error : ...")
> >
> >Is this 4.2 critical?
>
> Yes; you've shown that exists() doesn't work properly.
>
> > The important thing is the return value, not the error message.
>
> This is the correct patch! With this patch, the exists(...) works as
> expected.
I disagree.
Before
-------
gnuplot> foo = 8
gnuplot> if (!exists(foo)) print "Hi"
Hi
After
-----
gnuplot> foo = "baz"
gnuplot> if (!exists(foo)) print "Hi"
Hi
gnuplot> foo = 8
gnuplot> if (!exists(foo)) print "Hi"
internal error : non-string argument
Are you arguing that the old behaviour was wrong, and the
new behaviour is correct?
I think the original behaviour was correct:
if foo does not point to the name of a variable, exists(foo)
returns 0. After Daniel's patch it doesn't return at all;
it errors out. That means you cannot use exists(foo) to
test whether it contains the name of a variable.
--
Ethan A Merritt
Biomolecular Structure Center
University of Washington, Seattle 98195-7742
|