|
From: Daniel J S. <dan...@ie...> - 2006-08-13 20:59:57
|
Petr Mikulik wrote:
>>>2. Gnuplot supports both exists('a') and exist('a'), but documents
>>>only one of them. As it was me who made this confusion, I would
>>>propose to keep only exist('a').
>>
>>I would rather allow the extra 's' since it is more natural in
>>English. Do you really care about 1 extra character in the source code?
>
>
> I see votes for exists('a'). Thus exist('a') could be removed or be
> documented in gnuplot.doc (functions do not allow abbreviations).
>
> Further:
> gnuplot> print words(4)
> internal error : non-STRING argument
>
> gnuplot> print exists(4)
> 0
>
>
> Shouldn't we expect the same error message?
> (and "internal error: ...", not "... error : ...")
Yes, on both accounts. Otherwise one gets the following results:
gnuplot> print exists(alpha)
undefined variable: alpha
gnuplot> print exists("alpha")
0
gnuplot> alpha = 5
gnuplot> print exists(alpha)
0
gnuplot> print exists("alpha")
1
The third example of "exists" above is slightly misleading. Forcing the string error message will avoid any such confusion.
Is this 4.2 critical, Ethan? Otherwise, we can create a bug report and come back to it.
Dan
|