(j3.2006) zero-sized stuff

Robert Corbett robert.corbett
Wed Mar 18 20:50:08 EDT 2015


On 03/18/15 17:35, Walt Brainerd wrote:
> So if I understand this correctly, with the first assignment
> character string c gets its length from the expression, but
> not the value (not that it matters), but with the second
> assignment statement c does not get a value because it
> is zero length. I don't see any exception for an allocatable
> string. Now what am I missing?
>
> program f
> character(len=:), allocatable :: c
> c = ""
> print *, len(c), "X"//C//"X"
> c = "QQQ"
> print *, len(c), "X"//C//"X"
> end program f

The question would be if the variable mentioned in the
last sentence of paragraph 1 of 7.1.2.3 refers to the
variable before or after it has been deallocated and
then allocated as described in paragraph 3 of 7.1.2.3.

Bob Corbett



More information about the J3 mailing list