On Jan 12, 2006, at 8:48 AM, Aleksandar Donev wrote:
> Richard E Maine wrote:
>
>> So let's look at that question instead of the question of whether
>> ARRAY is a section, which doesn't seem to have much to do with the
>> definition of LBOUND.
> The "definition" of LBOUND is not really of relevance because it is
> circular, in that it uses the plain English "lower-bound"
The definition of LBOUND had better be of some relevance to determining
what its results are; I don't think "not really of relevance" was what
you meant. That the definition might be poorly or confusingly done, I
could believe. But I won't "buy" that it could be irrelevant. And note
that "lower bound" is a technical term rather than an English one. See
5.1.2.5.1 for the bnf of lower-bound, and the tie of the term "lower
bound" to that bnf.
While I might end up agreeing with your end point, I'm picky about
wording matters here. The whole question is one of a picky wording
matter in the standard, so it gets quite hard to answer if one uses
sloppy wording in the analysis.
> We define what the "lower bound" is for explicit arrays, assumed-shape
> arrays, pointers, allocatables, etc., but not for array sections. It
> should say somewhere that it is 1 for array sections, but all I can
> find in the standard is what the shape and rank are, not the bounds???
Yes. I'm missing something here also. That could be one possible
explanation - that this is both a component and a section, and that the
undiscovered (also by me) words define the lower bounds of the
section. I could buy this answer; easy for me to believe that I just
failed to find the missing words. That could make it all consistent
anyway, but...
This business about being both a component and a section still bugs me
though, because I could have sworn they were exclusive (and that
distinction was the one I kept having to look up). But I keep
rechecking and seeing the same thing. Maybe I'm blind to something
today.
> Richard, can you please check F95 for this?
Looks the same to me.
> I am confident the answer to Bert's question is: The bounds in both
> cases are [1,5].
I'm not so confident either way. Mostly because my attempt at careful
reading isn't jibing with my memory. Whether this means there is a
fault in my reading, my memory, both, or perhaps in my logic that says
they don't jibe - well, I can't confidently say right now.
There have been things that almost all compilers got wrong before, but
that still came out with interp answers contrary to what compilers were
doing. So while what most compilers seem to do is certainly a point to
consider, it isn't definitive. For example, it can easily be trumped by
internal inconsistency.
--
Richard Maine | Good judgment comes from experience;
[log in to unmask] | experience comes from bad judgment.
| -- Mark Twain
|