|
From: Daniel J S. <dan...@ie...> - 2006-06-18 22:31:55
|
Ethan A Merritt wrote:
> On Sunday 18 June 2006 12:28 pm, you wrote:
>
>>My feeling is that good programming practice would be to always go
>>back to the calling routine with some indication of whether this is
>>a DF_MISSING, DF_UNDEFINED or DF_BAD point and let the calling
>>routine handle it.
>
>
> MISSING and UNDEFINED are indeed returned to the caller, but so far
> the callers treat them the same way (plot2d.cline 446, plot3d.c line 688).
Yes and no. Yes, currently treated the same way. (I'm arguing they shouldn't be.) No, in some instances df_readascii() will decide "this is missing data, so I'm going to go back to the top and read another line of data". It does this via "line_okay". I say it should always return something if a non-comment is found.
>>will treat the third point as (2,3) whether "missing" is properly
>>set or not.
>
>
> I consider that a bug.
I'm in agreement with you.
> But it's been documented as behaving like that
> since forever, so I suppose we may be stuck with it.
It is, but as far as being stuck with it. I think the documentation was one of describing how it just happens to work because it was dealt with specifically. I see no use to the way that behaves so why have such behavior? (I know I'm a bit more willing to toss precedent to the wind than others.)
> To me it makes
> no sense to interpret the different lines of input as having different
> formats. I.e. if you read 2 values, X and Y, from lines 1 and 2 then
> it's crazy to suddenly switch modes and interpret line 3 as having
> an implicit X value and Y in column 1. But this is a digression.
Exactly. I don't think it is a digression.
>>But how about for a single column?
>>
>>gnuplot> plot '-'
>>input data ('e' ends) > 10
>>input data ('e' ends) > 20
>>input data ('e' ends) > ?
>> ^
>> Bad data on line 3
>>
>>Ooop, that happens when missing is not defined AND when it is defined.
>
>
> It works properly here. Are you sure you correctly set missing?
In the patch I had an extra unnecessary test condition.
>>Should I put together a demo?
>
>
> I'm less interested in a demo than in a re-written section for the
> docs. Once we have agreed on a statement of what is supposed to
> happen, then we can do any required bug fixing or demo-writing.
I just about have one. I think it is worthwhile to get a discussion going and will serve as a tutorial to the user so we can prevent such bug reports in the future. Ten minutes...
Dan
|