PR23152 - namelist can't contain an assumed size array - a standards question

Richard E Maine Richard.Maine@nasa.gov
Wed Aug 10 16:28:00 GMT 2005


On Aug 10, 2005, at 12:43 AM, THOMAS Paul Richard 169137 wrote:

> PS After writing this, I got to wondering just what non-constant bounds
> includes; definitely assumed-size but what about assumed shape?

I don't understand how you get "definitely" for assumed size, but are 
not
sure about assumed shape. They both sound like non-constant bounds to
me, and both by what seems like same point of view.  I could see a point
of view that said that neither had bounds that were given by expressions
that were nonconstant; that's not how I'd read it, but I'd at least 
understand
a consistent reading like that. But I am totally mystified as to how one
could read this one way for assumed size (with a "definitely" even), and
differently for assumed shape.

> Strictly speaking, namelist_14.f90 complies with both, since array(:) 
> has
> constant bounds and is assumed shape.

This makes no sense to me. How can something be assumed shape and
also have constant bounds? Hmm. I've go to look at the code because I
have no idea how you could say this.... Aha. I see. It has a constant
lower bound. Now I see at least one source of the confusion.

An array has nonconstant bounds if *ANY* of its bounds are other than
constants. An array has constant bounds only if *ALL* of its bounds
are constants. In both cases, "assumed" is not a constant.

-- 
Richard Maine                |  Good judgment comes from experience;
Richard.Maine@nasa.gov       |  experience comes from bad judgment.
                             |        -- Mark Twain



More information about the Fortran mailing list