(j3.2006) "Contiguous" doesn't quite do what I need

Dan Nagle dannagle
Fri Mar 23 18:51:52 EDT 2007


Van Snyder wrote in the original post:

<snip discussion>

>    The "contiguous" attribute can't be used in this case,
> while a dimension declaration (1:2:1,1:2:1,:) would work.

and subsequently, dick.hendrickson at att.net wrote:

> Van wasn't talking about a dimension statement here, he was talking about
> doing an operation on a slice of a previously dimensioned array.

Apparently, Van was speaking of a dimension attribute.
Worse, Van wants the attribute to be used for dummy arguments,
so the declaration must match the original, modulo any slice
taken via pointer assignment or as the corresponding actual argument.

With rank as high as 15 in f08, that's error prone.

Then, Van commented further (regarding my comment
about it being error prone),

> No more so than explicit shape, of which it is a generalization.

With the added complexity that the new declaration must match
the original, it is more error prone.

dimension a( :, :, :) matches any rank three array (of the right TK).

dimension a( l:u:1, ..., l:u:1) must match the earlier declaration,
as modified by subsequent association, where the associations
may involve strides known only during execution.

Sorry, it's more complex.  And, because it involves counting
individual extents, it's more error prone.  Sure, you can prove it
works in the simple examples (if you get them right), but
in the more general case, it's error prone.

Did you mean the seventh, or was it the eighth (of, say, twelve)
to be the contiguous extent?  (You'll put smudges on the screen
if you touch it with your fingers.)



Dan Nagle
Purple Sage Computing Solutions, Inc.

More information about the J3 mailing list