Dear Tobias,

thanks for your comments.

> > A variable that is a data statement object shall be a designator,
> > thus a character variable shall have a constant length.
> 
> This comment is wrong: A designator does not imply this – nor is
> F2018:C875 violated, not even the substring starting/ending point
> const expr bit.

OK, I will think of a better wording.

> In the following variant of the program, the invalid
> variable declaration of 'c' itself is avoided by using
> a block:
> 
> integer :: ll
> ll = 4
> block
>    character(ll) :: c(2), cc(2)
>    character(ll) :: c2(2), cc2(2)
>    data c /'a', 'b'/
>    data c2(:)(1:1) /'a', 'b'/
>    common /block/ cc, cc2
> end block
> end

No, this example is invalid, see

C1107(R1107) A block-specification-part shall not contain a COMMON, 
EQUIVALENCE, INTENT, NAMELIST,
OPTIONAL, statement function, or VALUE statement.

Harald

Reply via email to