[J3] Conflict in substrings description?

Bill Long longb at cray.com
Thu Oct 11 14:09:36 EDT 2018


An array section with a substring-range is not a substring.  It is based on a separate syntax rule in 9.5.3.1:

R918 array-section   is   data-ref [ ( substring-range ) ]
                                       or complex-part-designator

Cheers,
Bill


> On Oct 11, 2018, at 12:54 PM, Steven G. Kargl via J3 <j3 at mailman.j3-fortran.org> wrote:
> 
> All,
> 
> In N2146, one has
> 
> 9.4.1 Substrings
> 
> 1 A substring is a contiguous portion of a character string (7.4.4).
> 
> R908 substring        is parent-string ( substring-range )
> 
> R909 parent-string    is scalar-variable-name
>                      or array-element
>                      or coindexed-named-object
>                      or scalar-structure-component
>                      or scalar-constant
> 
> R910 substring-range  is [ scalar-int-expr ] : [ scalar-int-expr ]
> 
> Then, later in Sec. 9.5.3.1 (page 134), one finds
> 
> 1 An array element is a scalar. An array section is an array.  If
>  a substring-range appears in an array-section, each element is
>  the designated substring of the corresponding element of the
>  array section.
> 
> An array-section is not listed as a possible parent-string,
> so how can a substring-range appear with an array-section?
> 
> -- 
> Steve

Bill Long                                                                       longb at cray.com
Principal Engineer, Fortran Technical Support &   voice:  651-605-9024
Bioinformatics Software Development                      fax:  651-605-9143
Cray Inc./ 2131 Lindau Lane/  Suite 1000/  Bloomington, MN  55425




More information about the J3 mailing list