(j3.2006) Coindexed scalars, etc.

Aleksandar Donev donev1
Sat Jan 17 11:35:05 EST 2009


Hello,
I think the [] should always go at the end, after all the local 
selectors, including substrings, so I vote for c(i)(l:r)[p]. For %Re and 
%Im I agree that they should be treated as components.
Aleks

Van Snyder wrote:
> Assuming we want coindexed scalars, substrings and complex part
> designators, where do we want to put the image selector?  For a scalar
> it's obvious.  For complex part designators, I think we want them before
> %RE or %IM, as if they were components.
> 
> For substrings it's not obvious.  Do we want C(i)[p](l:r) or
> c(i)(l:r)[p]?  It's a little bit weird to put the image selector in the
> middle.  OTOH, by putting it there, we can use <data-ref> to grab the
> constraints on <image-selector>.  Perhaps <part-ref> should have been
> <part-name> [<image-selector>] [(<section-subscript-list)] -- but this
> would break existing implementations.
> 
> Malcolm's message yesterday didn't edit the productions for substrings.
> 
> The suggestion here replaces <object-name> in R601 instead of adding
> <coindexed-named-object>.
> 
> I believe the following covers coindexed scalars, coindexed complex
> parts, coindexed type parameter inquiries, and coindexed substrings.
> Adding coindexed whole arrays is trivial (just remove the proposed
> constraint C600a).
> 
> R601 <designator> <<is>> <non-substring-designator>
>                   <<or>> <substring>
> 
> R601a <non-substring-designator> <<is>> <data-ref>
>                                  <<or>> <array-element>
>                                  <<or>> <array-section>
>                                  <<or>> <complex-part-designator>
>                                  <<or>> <structure-component>
> 
> C600 (R601a) A <section-subscript-list> shall not appear in <data-ref>.
> {This blocks C624 from the general case.  We don't need to say "exactly
> one <part-ref>" because the constraint on <structure-component> says
> "more than one".}
> 
> C600a (R601a) The <data-ref> shall be scalar if an <image-selector>
>       appears.
>       {I believe this constraint is harmful.}
> 
> R609 <parent-string> <<is>> <scalar-non-substring-designator>
>                      <<or>> <scalar-constant>
> 
> 
> _______________________________________________
> J3 mailing list
> J3 at j3-fortran.org
> http:// j3-fortran.org/mailman/listinfo/j3
> 


-- 
Aleksandar Donev, Ph.D.
Lawrence Postdoctoral Fellow @ LLNL
High Performance Computational Materials Science and Chemistry
E-mail: donev1 at llnl.gov
Phone: (925) 424-6816  Fax: (925) 423-0785
Address: P.O.Box 808, L-367, Livermore, CA 94551-9900
Web: http://cherrypit.princeton.edu/donev



More information about the J3 mailing list